Saheel Sapovadia
Saheel Sapovadia

Reputation: 3403

Installing node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node) error on linux

I have followed this - How to install node.tar.xz file in linux

in the end while doing node --version I am getting these errors -

enter image description here

What should be done next here?, not able to find proper steps with respect to my scenario.

Upvotes: 26

Views: 96881

Answers (2)

Shashank Bodkhe
Shashank Bodkhe

Reputation: 1032

Observed the same error on the Linux machine of AWS.

This error will also be observed when we have installed Node JS and when we check the version. To resolve the issue we need to have greater than GLIBCv2.6. Amazon provides Linux boxes with GLIBC v2.6 and greater version than this as well. Before starting dev work use the below command to select a suitable machine

command used : ldd --version (on Amazon Linux machine) :

execute command on Linux/ Unix based system

Upvotes: 1

Bruce Malaudzi
Bruce Malaudzi

Reputation: 456

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 v18 supports GLIBC v2.7 or later. When you attempt to install Node v18.x on any Linux OS that has GLIBC v2.6 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

I can suggest three options to resolve this issue:

  1. Either install Node from source code. This will allow you to recompile
  2. Or install an older version of Node that your OS can support
  3. Or upgrade your Linux OS to a newer version.

Reference: Install Node from source code

Upvotes: 32

Related Questions