nvm
nvm copied to clipboard
It is not installing on wsl windows 11
Operating system and version:
windows 11
nvm debug output:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:-- 0curl: (6) Could not resolve host: raw.githubusercontent.com
nvm ls output:
How did you install nvm?
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
What steps did you perform?
I installed wsl and then ran the command
What happened?
It didn't resolve
What did you expect to happen?
for it to install, instead it threw
(6) Could not resolve host: raw.githubusercontent.com
This message implies your computer can’t connect to github - this isn’t something nvm can fix.
Are you located in a country or workplace that’s hostile to the internet? Theres not much to do about these kinds of network conditions besides relocating, either physically or using a vpn.
I'm on a solid internet connection,
some people said they were able to solve it by switching to wsl 1
and that it might be anti virus or vpn related,
I'm on a brand new computer that I'm trying to create a back up image after I situate my environment.
I was hoping to find a more permanent solution.
Interesting! I wouldn’t expect problems in that env. WSL1 isn’t fully posix compliant, i believe, so I’d suggest sticking to wsl2.
You could try investigating dns, and ipv6 settings, and see what things you can reach from windows but not wsl?
I can ping 8.8.8.8 although I can't ping google.com
This seemed to solve it!
sudo rm /etc/resolv.conf
sudo bash -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf'
sudo bash -c 'echo "[network]" > /etc/wsl.conf'
sudo bash -c 'echo "generateResolvConf = false" >> /etc/wsl.conf'
sudo chattr +i /etc/resolv.conf
it deletes your resolve.config file thats automatically generated when u run WSL then creates a new file and puts "nameserver 8.8.8.8", then creates a wsl.conf file and adds [network] and generateResolveConf = false to prevent auto generation of that file
you can also run
cat /etc/resolv.conf
to check the contents of the file
than
ping google.com
Wow, thanks! Any chance you’d want to PR this into the troubleshooting section of the readme?
I would be honored
do you happen to know why my PR failed the eclint test and is it an issue?
Not yet, and no, it's not :-) I'll figure it out when landing it. Thanks!