You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my program import google/gopacket, and I use go build -o main main.go to build go program in Ubuntu 18.04.3 LTS .
Then 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,
What did you expect to see?
the go program main can run normally.
What did you see instead?
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 does not include the library libpcap, but Ubuntu 18.04 includes, while the program main is linked to libpcap.
my goal is to run go program on the CentOS which dosen't include libpcap.
Is there any way to statically package libraries 'libpcap' into go programs? How ?
could anyone help me ?
The text was updated successfully, but these errors were encountered:
Unlike other projects, we do not use the issue tracker for questions such as these. It is only used for bugs and feature proposals. I will close this issue, but please feel free to ask it in any of these forums below:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
my program import
google/gopacket
, and I usego build -o main main.go
to build go program inUbuntu 18.04.3 LTS
.Then I run the linux executeable program
main
inCentOS Release 6.10 (Final) Kernel Linux 2.6.32-754.el6.x86_64
, which does install go enveriment,What did you expect to see?
the go program
main
can run normally.What did you see instead?
it report an error:
because
CentOS
does not include the librarylibpcap
, butUbuntu 18.04
includes, while the programmain
is linked tolibpcap
.my goal is to run go program on the CentOS which dosen't include
libpcap
.Is there any way to statically package libraries 'libpcap' into go programs? How ?
could anyone help me ?
The text was updated successfully, but these errors were encountered: