Reputation: 21
I spend a lot of time and tons pages...
I have a an strange issue while installing nodejs on ubuntu 14.04 server (via nvm). When i run "nvm install 0.12.7" nvm gives me an answer:
curl: (6) Could not resolve host: nodejs.org
grep: /root/.nvm/bin/node-v0.12.7-linux-x86/node-v0.12.7-linux-x86.tar.gz: No such file or folder
Binary download failed, trying source.
nvm: install v0.12.7 failed!
If i type "nvm install 0.12.7" one more time, i got answer message:
Version '0.12.7' - not found - try 'nvm ls-remote' to browser available versions
I was try to install all available versions, also with -s postfix, but has a same error. I was try to install nodejs with sudo & from root. Same error. I was try uninstall and reinstall nvm with sudo and from root. Same error.
If i re-login and type nvm instal..... - I'll get a first fail, then second and so on.
I can install nodejs using apt-get, but i need to use nvm, it must be able to test project on many nodejs versus installed. Hope for help!
Upvotes: 2
Views: 11340
Reputation: 1
On that link https://github.com/nvm-sh/nvm/issues/2771 was exactly what happened to me. I just uninstalled the curl snap package and installed it again using apt and finally removed nvm and reinstalled it again, all following the instructions on their github repo https://github.com/nvm-sh/nvm#uninstalling--removal
Upvotes: 0
Reputation: 19
Instructions to Install Nodejs latest Version for Ubuntu via NVM:
P.s - In order to Unistall NVM:
rm -rf $NVM_DIR ~/.npm ~/.bower
Start With This:
Exit the Terminal and Start Again
3.... sudo rm -rf /var/lib/apt/lists/* sudo rm -rf /etc/apt/sources.list.d/* sudo apt-get update
4... curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
5... sudo apt-get install -y nodejs
6.. sudo apt install build-essential
Upvotes: 1
Reputation: 17834
With me, it worked when I added versions directories manually 😕
mkdir ~/.nvm/versions
Upvotes: 0
Reputation: 774
Manually adding the . ~/.nvm/nvm.sh (or bash ~/.nvm/nvm.sh)
causes it to complain: N/A: version "N/A" is not yet installed. Even nvm list causes this error.
Upvotes: 0
Reputation: 715
I also had the same issue on ubuntu 14.04. Simply append v in front of version. That is the command will be nvm install v0.12.7
.
And it worked like charm for me!
Upvotes: 2