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
By default Go programs that import the "net" package, in your example via "net/http", are dynamically linked with the system libraries and system dynamic interpreter. That can in some cases mean that those programs can't be run on a different system. That is what is happening to you.
You can avoid this by setting CGO_ENABLED=0 when you run go build. That will give you a statically linked program. That has various consequences, such as not supporting certain complex and unusual DNS configurations.
I'm closing this issue because this is not a bug in Go. If you have further questions about this, please do not use the issue tracker. Please use a forum instead. See https://golang.org/wiki/Questions. Thanks.
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?
Write a simple program then go build then put it in another os.
runs
scp it to a CentOS 7 server produces
What did you expect to see?
can run the program
What did you see instead?
The text was updated successfully, but these errors were encountered: