Error while installing Nodejs on Godaddy Shared Linux Hosting - node.js

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.

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

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!

Just Install the lowest version of Node..
Run the following command:
nvm install v6.8.0
....
and cheers!

Related

chef workstation | Error while generating cookbook

I have insalled chef workstation on aws ec2 instance. When i try to generate cookbook it gives error. I am unable to figure out problem. I have also attached picture. Guide me about this error.
/opt/chef-workstation/embedded/bin/ruby: /lib64/libcrypt.so.1: version `XCRYPT_2.0' not found (required by /opt/chef-workstation/embedded/lib/libruby.so.3.0)
/opt/chef-workstation/embedded/bin/ruby: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /opt/chef-workstation/embedded/lib/libruby.so.3.0)
/opt/chef-workstation/embedded/bin/ruby: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by /opt/chef-workstation/embedded/lib/libruby.so.3.0)

I need Glibc install

How do I install Glibc 2.28 on linux ? I've looked for different ways and I couldn't.
I need it to start a bedrock minecraft server on a vps.
If you know an easier way to open a server with minecraft bedrock plugins, please tell me, I've been trying for 3 days, I've already created about 8 instances just to start over. Newbie on linux haha!
IBC_2.28' not found (required by node)
wine: cannot find './bedrock_server.exe'
node: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
wine: cannot find './bedrock_server.exe'
node: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
wine: cannot find './bedrock_server.exe'
node: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
wine: cannot find './bedrock_server.exe'
node: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
wine: cannot find './bedrock_server.exe'
node: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
wine: cannot find './bedrock_server.exe'
node: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
wine: cannot find './bedrock_server.exe'
node: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
wine: cannot find './bedrock_server.exe'
node: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
wine: cannot find './bedrock_server.exe'
node: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
How do I install Glibc 2.28 on linux ?
You don't.
Instead, select a distribution which has that version (or newer) and use it.
You can find which distribution has which version of GLIBC on http://distrowatch.com
Since you tagged your question with ubuntu-18.04, it came with GLIBC-2.27. You want any newer Ubuntu, e.g. 20.04 (GLIBC-2.31), etc.

GLIBC_2.17 not found

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 :(
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.
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

Node not running on linux shared server due to outdated libraries. How to update?

I installed node.js on godaddy linux server as per the instructions given in:
https://ferugi.com/blog/nodejs-on-godaddy-shared-cpanel/
When I run the command: node --version, I get the 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.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.14' not found (required by node)
While it seems that my libraries are outdated, I don't know how to update the libraries on a linux shared server. apt does not work. Any solution for this?
As I learned that libc version is strongly tied with the distribution version. It's not possible to update libc along. Updating the distribution is too complicated, I suggest you download a lower version nodejs binary to be compatible with your OS version.

How to Install Node version 14.18.2 Using Homebrew

Using homebrew I am able to install node v12, v14, v16 and v17. But it seems to only install the latest stable version of each.
I am using an M1 Mac - any ideas on how to install node version 14.18.2 using homebrew?
Instead of brew, you can use nvm to install and switch between different version of node.js on you Mac OSX :
https://github.com/nvm-sh/nvm

Resources