Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

when run compiled version in other machine I got GLIBC error #8

Closed
codeskyblue opened this issue Oct 8, 2014 · 2 comments
Closed

Comments

@codeskyblue
Copy link

./gogs: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ./gogs)
@codeskyblue
Copy link
Author

this is a message from https://groups.google.com/forum/#!topic/golang-nuts/C_XnXq9mpNU

unfortunately, no magic here.

you have several alternatives:

  1. if your program doesn't use cgo (either directly or indirectly, exclude those in the standard library), you can
    try build it with the binary distributions which is compiled with an old enough glibc.
  2. you can disable cgo, and rebuild go (set CGO_ENABLED=0, then run src/make.bash)
  3. alternatively to 3, if the only reason cgo is used is the net package, you can try build the net package with the
    "netgo" build tag. go build -a -v -tags netgo std; and then rebuild your program.
  4. use a chroot with an environment that matches the production server, and build Go and your program in that chroot.

@karalabe
Copy link
Owner

karalabe commented Oct 8, 2014

You pretty much have your issue and solution there. The glibc on the machine you are trying to run the binary is too old and incompatible with the one used by xgo. You'll either need a custom docker image with an old glibc or a newer machine to run on.

I don't really see any motivation within the xgo project for fixing this issue and supporting deprecated glibc versions.

@karalabe karalabe closed this as completed Oct 8, 2014
kolaente pushed a commit to kolaente/xgo that referenced this issue May 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants