Reputation: 46900
Trying to install NVM on Ubuntu 20.04 LTS. When I run the install script this happens:
ole@ole-ThinkPad-T470:~/Temp/nv$ wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
=> Downloading nvm as script to '/home/ole/.nvm'
Failed to download 'https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/nvm-exec'
Failed to download 'https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/nvm.sh'
=> nvm source string already in /home/ole/.bashrc
Failed to download 'https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/bash_completion'
=> bash_completion source string already in /home/ole/.bashrc
main: line 433: /home/ole/.nvm/nvm.sh: No such file or directory
=> Close and reopen your terminal to start using nvm or run the following to use it now:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
But if I wget one of the scripts that fails to download it works:
ole@ole-ThinkPad-T470:~/Temp/nv$ wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/nvm-exec
--2021-05-25 18:39:08-- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/nvm-exec
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.108.133, 185.199.111.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 344 [text/plain]
Saving to: ‘nvm-exec.1’
nvm-exec.1 100%[========================================================>] 344 --.-KB/s in 0s
2021-05-25 18:39:08 (4.25 MB/s) - ‘nvm-exec.1’ saved [344/344]
ole@ole-ThinkPad-T470:~/Temp/nv$ ls
nvm-exec
Thoughts?
Upvotes: 5
Views: 9657
Reputation: 31
uninstalling snap curl and installing apt install resolved this for me as well,
sudo snap remove curl
sudo apt install curl
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
nvm install node
Upvotes: 2
Reputation: 46900
It looks like it's related to installing wget or curl with snap on Ubuntu:
https://github.com/nvm-sh/nvm/issues/2504
Here's what fixed it for me:
sudo snap remove curl
sudo apt install curl
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
nvm install node
Upvotes: 11