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:
Copy$ ldd --version
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.
Reference: Install Node from source code
Answer from Bruce Malaudzi on Stack Overflownode.js - Getting GLIBC_2.28 not found - Stack Overflow
RHEL 7.9 GLIBC Errors
gcc - How to run node v20.x on CentOs 7.9? - Unix & Linux Stack Exchange
aws-lambda-nodejs /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
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:
Copy$ ldd --version
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.
Reference: Install Node from source code
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) :

While Cris' answer is most likely correct in that it describes the root cause, he doesn't offer a solution compatible with the asker's environment (GoDaddy shared hosting).
According to these instructions from CodePunker, the solution is to install an older version of node.js that is compatible with whatever version of libstdc++ is installed on your GoDaddy shared host.
- If you get an error during installation saying you don't have the required GLIBC version then you need to install an older (potentially unsupported) version of Node.js
- To do that, execute nvm ls-remote --lts which will show you all the long term support Node.js versions that exist in the repository. Install an older one by issuing nvm install vX.X.X and then nvm use vX.X.X
The specific version of node.js that you'll need to install will depend on how outdated your shared host is. I tested this successfully with v10.13.0, but I just jumped to the oldest release in the current branch and did not test any newer versions.
You can also call GoDaddy Support and request that they update your host or move your site to a different shared host with more up-to-date libraries.
Update your base system or compile from source (which may also require updating your base system.) No GLIBCXX_3.4.15 symbols means your libstdc++ is from 2009 or earlier.
Finally I got solution by running the following commands.
sudo apt-get remove nodejs
nvm install 16.15.1
Node.js v16.15.1 version and npm v16.15.1 is installed. For the same, make sure nvm is installed in your machine.
You can install Node.js v17.x by nvm (Node.js version manager).
My OS version: Ubuntu 18.04.6 LTS (Bionic Beaver)
I tried three ways to install Node.js and npm on my pc:
(fail) apt-get. The version is very old
$ sudo apt-get install nodejs $ sudo apt-get install npm $ node -v v8.10.0 $ npm -v 6.1.0(fail) script from source code of Node.js, only Node.js is updated, npm is not. https://github.com/nodesource/distributions/blob/master/README.md#using-ubuntu-1
$ curl -sL https://deb.nodesource.com/setup_14.x -o /tmp/nodesource14_setup.sh $ node -v v14.20.1 $ npm -v 6.1.0(success) use nvm
https://github.com/nvm-sh/nvm#installing-and-updating
$ sudo apt-get remove nodejs $ sudo apt-get remove npm $ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash $ chmod +x ~/.nvm/nvm.sh $ source ~/.bashrcnvm install 14 $ node -v v14.20.1
nvm install 16 $ node -v v16.18.0
nvm install 17 $ node -v v17.9.1 $ npm -v 8.11.0 # Failed to install 18 $ nvm install 18 $ node -v node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node) $ npm -v node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
Any solutions for this GLIBC_2.28 issue on the Linux server? I have tried both commands, but the issue persists.