Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while installing Nodejs on Godaddy Shared Linux Hosting

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.

like image 972
Sran Manpreet Avatar asked Aug 22 '19 04:08

Sran Manpreet


People also ask

Can I install node js on shared hosting?

You can run node. js server on a typical shared hosting with Linux, Apache and PHP (LAMP).


Video Answer


1 Answers

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

like image 72
Dreyser Eguia Avatar answered Oct 12 '22 01:10

Dreyser Eguia