19

I am installing Node.js on Godaddy Shared Linux Hosting by connecting to SSH via PuTTy. Getting Errors.

I ran

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash

command to install nvm. NVM is successfully installed as I getting response '0.34.0' on running nvm --version.

I am running nvm install node to install Node.js.

After running this command I am getting following errors:


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: /lib64/libc.so.6: version `GLIBC_2.17' 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.14' not found (required by node)
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `nvm use --delete-prefix v12.9.0` to unset it.

I am expecting nvm install node to successfully install Node.js and all its dependencies. Actual Results (From Putty):

nvm install node

Downloading and installing node v12.9.0...
Downloading https://nodejs.org/dist/v12.9.0/node-v12.9.0-linux-x64.tar.gz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
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: /lib64/libc.so.6: version `GLIBC_2.17' 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.14' not found (required by node)
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `nvm use --delete-prefix v12.9.0` to unset it.

Referencing this blog - https://ferugi.com/blog/nodejs-on-godaddy-shared-cpanel/

Kindly help.

Hello World
  • 2,673
  • 7
  • 28
  • 60
Sran Manpreet
  • 312
  • 1
  • 2
  • 6
  • 1
    I'm voting to close this question as off-topic because your question is not "Programming" related, it is more appropriate for the StackExchange sites [**Super User**](http://superuser.com/) or [**ServerFault**](http://serverfault.com/). – David C. Rankin Aug 22 '19 at 04:45
  • 3
    This question was helpful to me and does pertain to programming. – stromyc Feb 18 '21 at 19:09
  • 2
    I found this post helpful as it allowed me to move forward via the production server. Please do not close at it is relevant and useful – Erik James Robles Sep 11 '22 at 18:29

3 Answers3

33

I had the same problem and after googling it for a while I was able to find a solution, since you cannot install glibc package because of the lack of privileges the workaround would be to install and older version of node, in my case I used v6.8:

nvm install v6.8.0
Now using node v6.8.0 (npm v3.10.8)
Creating default alias: default -> v6.8.0 

I will start testing now

Dreyser Eguia
  • 428
  • 4
  • 12
  • 15
    Also `v8.16.2`, `v10.17.0` and `v11.15.0` are available – user2976753 Nov 05 '19 at 19:37
  • 1
    It is temporary changing version not affecting globally.Any solution for that? – Shivani P Dec 13 '19 at 11:15
  • 4
    `nvm install v11` Downloading https://nodejs.org/dist/v11.15.0/node-v11.15.0-linux-x64.tar.gz... ######################################################################## 100.0% Now using `node v11.15.0 (npm v6.7.0)` – Digvijay Apr 18 '20 at 05:37
  • Its worked with v6.8.0 , what if I want to install higher version ? @user2976753 why only specific versions ? is there any reason for it? – Murali Krishna Aug 04 '21 at 12:39
8

As of today, I could go up till v11.15.0 after which this same error starts to pop up. Type the following commands:

nvm ls-remote

This shows up a long list of versions of NodeJS versions available to download and install. The versions in green are the LTS releases. To install a specific version, say v11.15.0, type in

nvm install 11.15.0

After the installation is finished, you can check if its working by just typing in:

node -v
npm -v

These commands show the versions of NodeJS and NPM respectively. So, now in your situation you'd have two versions of NodeJS installed in your system. To see the list of installed versions, type:

nvm ls

To use v11.15.0 or the version of your choice,

nvm use 11.15.0

In this way, you can switch between versions. To set a default version for every session,

nvm alias default 11.15.0

Now you probably need to uninstall the version that was causing the bug,

nvm uninstall 12.9.0

That's it!

1

Just Install the lowest version of Node..

Run the following command:

nvm install v6.8.0

.... and cheers!

subtleseeker
  • 4,415
  • 5
  • 29
  • 41
  • 1
    in fact, you don't even need to specify exact version number. just the first number in the version number like v11. for some reason, It won't accept any version above v11. At least this way I am using somewhat newer version of node instead of 0.8 or 0.9... :) – ThN Apr 22 '21 at 18:35