0

I have been trying to install node js to my shared hosting server with cpanel. I have been successful to download and install node but every time try to access node via terminal it throws errors like

node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.16' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.17' 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.14' not found (required by node)
node: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by node)
node: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by node)
node: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by node)
node: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by node)
node: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by node)
node: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node)
node: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by node)

I have even downloaded glibc_2.14 via wget and also unzipped everything in the directory: /home/glibc_2.14/configuration/

Now I am quite confused what should i do with these files?

When i do echo $LD_LIBRARY_PATH it returns an empty string

I just want to update my glibc on my cpanel. please help... I have been trying this for so long now :(

Employed Russian
  • 199,314
  • 34
  • 295
  • 362

2 Answers2

2

These errors:

node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node)
node: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by node)

mean that the node binary you are trying to install was build on a GLIBC-2.28 or later system, using GCC-5.1.0 (ABI reference).

You are trying to run that binary on a machine with GCC-4.4.2 and GLIBC older than 2.14. That's not going to work.

Trying to use GLIBC-2.14 isn't going to work either -- you need at least GLIBC-2.28.

You really shouldn't be running such an old OS -- there are many vulnerabilities that have long been fixed since then. Your best bet is to upgrade your OS to something more modern, and then install node compiled specifically for that OS.

It's possible to work around this by setting LD_LIBRARY_PATH and using patchelf appropriately (see this answer), but I doubt you'll succeed with that approach.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362
  • Its not like i actually want to use this OS rn but I don't have any choice. This whole thing is going on a cpanel web server. I just wanted a work around to not pay for the extra costs of the hostings which supports node js on the go. But now ig i have realised its not quite possible as the files which i am trying to install requires admin priviledges which i just cant have. Thanks for your time and answer tho. APPRICIATED. – Anas Mohammad Sheikh Oct 03 '22 at 07:33
0

try this:

sudo apt-get remove nodejs
nvm i 16  
sudo apt-get install nodejs
sudo apt-get install npm
node -v
npm -v
nvm -v

run it several times , clean cache and relaunch the system several times

Alma Konde
  • 11
  • 3