Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version `GLIBC_2.25' not found #2149

Closed
rynz opened this issue Jun 4, 2020 · 2 comments
Closed

version `GLIBC_2.25' not found #2149

rynz opened this issue Jun 4, 2020 · 2 comments

Comments

@rynz
Copy link

rynz commented Jun 4, 2020

  • Node Version: v14.4.0 and v6.14.5
  • Platform: Linux Ryan-Ubuntu 5.3.0-53-generic #47~18.04.1-Ubuntu SMP Thu May 7 13:10:50 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Compiler: Using built-in specs. COLLECT_GCC=cc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.5.0-3ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
  • Module: https://doc.libsodium.org/installation
Verbose output (from npm or node-gyp):
Error Error: /snap/core/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /usr/local/lib/libsodium.so.23)

I have v2.27 of glibc on my machine, I also compiled libsodium using the installation instructions. My module builds no worries but when I run it I get this error. When I log gnu_get_libc_version() it shows node-gyp is using v2.23.

How do I configure node-gyp to use at least v2.25 of glibc or must I compile nodejs myself?

@rvagg
Copy link
Member

rvagg commented Jun 4, 2020

/snap/core/current/lib/x86_64-linux-gnu/libc.so.6, so I guess you're using the Node.js Snap to do this. A Snap runs in an executable container-like environment and uses runtime libraries found in Snap Core, which is in /snap/core/current/ and is based on Ubuntu Xenial and therefore uses glibc 2.23, which is where this is coming from.

Without tinkering I'm not sure the best way to solve this if you still want to use the Snap, although you could consider switching to a manual install or use deb.nodesource.com to get a .deb. If you run the executable directly, via /snap/node/current/bin/node then you run outside of the app container, so you could do that if you wanted to but you'd be opting out of some of the benefits of snaps and you could possibly have the node executable file disappear from out under you (the current directory is a symlink that will be replaced when a new version of Node.js is released) which may, or may not matte for long-running processes. But if you wanted to use it directly like that then you're going to have to get that as a prefix to all of your Node.js processes, including npm and node-gyp which, if you run them directly, use your PATH to find node. You could run /snap/node/current/bin/node /path/to/node-gyp/bin/node-gyp.js ..., but that gets messy quickly. Also if you do it this way, you have to make sure that you do the same for any node processes you run that use addons that have been compiled like this or you'll get a mismatch at module loading time.

You could also try to compile libsodium against glibc 2.23 so you don't run into this problem.

@rynz
Copy link
Author

rynz commented Jun 4, 2020

@rvagg I can't thank you enough for your help. I've removed the Node.js Snap and instead have opted for nvm which has fixed the issue. I really appreciate your time and detailed explanation.

Thank you again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants