google / google/gopacket

How to package libraries 'libpcap' into go programs? error while loading shared libraries: libpcap.so.0.8.

Open
#734 14 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
6.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

my `go` program import `gopacket`, I use `go build -o main main.go` to build program, system is `Ubuntu 18.04.3 LTS` with `go version go1.13.1 linux/amd64`.
when I run the linux executeable program `main` in `CentOS Release 6.10 (Final)` Kernel Linux 2.6.32-754.el6.x86_64, which does install go enveriment, it report an error:
> [root@localhost Desktop]# ./main
> ./main: error while loading shared libraries: libpcap.so.0.8: cannot open shared object file: No such file or directory

because CentOS doesn't contain`libpcap`, my goal is to run go program on the CentOS which dosen't hava `libpcap` or go enveriment.
Is there any way to package libraries 'libpcap' into go programs? How ?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.