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

Node.js is showing error "node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)" #52241

Open
yogeshlc opened this issue Mar 28, 2024 · 4 comments

Comments

@yogeshlc
Copy link

Version

node-v20.11.0-linux-x64.tar.xz

Platform

Linux yogVM 5.4.17-2136.325.5.1.el7uek.x86_64

Subsystem

No response

What steps will reproduce the bug?

  • Extract node.js tar at location /usr/local
  • check node --version cmd which is failing with error
    Error:
    node --version
    node: /lib64/libm.so.6: version GLIBC_2.27' not found (required by node) node: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by node)
    node: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by node) node: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by node)
    node: /lib64/libc.so.6: version GLIBC_2.28' not found (required by node) node: /lib64/libc.so.6: version GLIBC_2.25' not found (required by node)

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior? Why is that the expected behavior?

node --version
v20.11.0

What do you see instead?

node --version
node: /lib64/libm.so.6: version GLIBC_2.27' not found (required by node) node: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by node)
node: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by node) node: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by node)
node: /lib64/libc.so.6: version GLIBC_2.28' not found (required by node) node: /lib64/libc.so.6: version GLIBC_2.25' not found (required by node)

Additional information

No response

@ryker-uptycs
Copy link

This error happens when you install Node on an operating system that has a version of GLIBC that is lower than Node can support. For example, Node v20 supports GLIBC v2.27 or later. When you attempt to install Node v20.x on any Linux OS that has GLIBC v2.27 or lower, you will get such errors.

To see the version of GLIBC that your operating system has, execute the ldd command on the terminal:

$ ldd --version
you will get output like this.

ldd (Ubuntu GLIBC 2.35-0ubuntu3.6) 2.35

I can suggest three options to resolve this issue:

  • Either install Node from source code. This will allow you to recompile

  • Or install an older version of Node that your OS can support

  • Or upgrade your Linux OS to a newer version.

@yogeshlc
Copy link
Author

ldd --version
ldd (GNU libc) 2.17

@yogeshlc
Copy link
Author

If Possible can you please share/point me to the location where i can get the steps to recompile?

@Ch3nYuY
Copy link
Contributor

Ch3nYuY commented Mar 29, 2024

# install node from source code
git clone https://github.com/nodejs/node && git checkout v20.11.0
./configure && make -j4

You might also encounter compilation errors related to GLIBC version, which can be resolved by referring to the methods mentioned in #52223.

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

3 participants