Getting GLIBC_2.28 not found

Viewed 14086

I running node -v command getting error:- node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)

enter image description here

Any solution

4 Answers

Finally I got solution by running by running following commands.

sudo apt-get remove nodejs
nvm install 16.15.1

v16.15.1 node version and npm v v16.15.1 is installed. For same make sure nvm is installed in your machine.

You likely have a node version installed that is compiled for a different ubuntu release to the one you are running.

I would suggest removing it, then installing the nodesource binary distribution. It should auto-detect your ubuntu release and install the correct node release.

You got the issue because node version is not compatible with ubuntu. IN my case, I got the same issue with Ubuntu 18 & Node 16.15.1.

Using this command to check GLIBC version

ldd --version

My version is 2.27. So I has tried to fix by change the nodejs version.

sudo apt-get remove nodejs
nvm install 14.17.6

This issue can be resolved by switching to stable available node version. You can switch to the stable node version with the below command.

nvm install --lts

Then, Use nvm alias default {VERSION} to switch the version of Node.js used by default when starting a new shell.

Related