Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is not installing on wsl windows 11 #2958

Closed
mattjaf opened this issue Nov 30, 2022 · 9 comments · Fixed by #2961
Closed

It is not installing on wsl windows 11 #2958

mattjaf opened this issue Nov 30, 2022 · 9 comments · Fixed by #2961

Comments

@mattjaf
Copy link
Contributor

mattjaf commented Nov 30, 2022

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
@ljharb
Copy link
Member

ljharb commented Nov 30, 2022

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.

@mattjaf
Copy link
Contributor Author

mattjaf commented Nov 30, 2022

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.

@ljharb
Copy link
Member

ljharb commented Nov 30, 2022

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?

@mattjaf
Copy link
Contributor Author

mattjaf commented Dec 1, 2022

I can ping 8.8.8.8 although I can't ping google.com

@mattjaf
Copy link
Contributor Author

mattjaf commented Dec 1, 2022

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

@ljharb
Copy link
Member

ljharb commented Dec 1, 2022

Wow, thanks! Any chance you’d want to PR this into the troubleshooting section of the readme?

@mattjaf
Copy link
Contributor Author

mattjaf commented Dec 1, 2022

I would be honored

@mattjaf
Copy link
Contributor Author

mattjaf commented Dec 1, 2022

do you happen to know why my PR failed the eclint test and is it an issue?

@ljharb
Copy link
Member

ljharb commented Dec 1, 2022

Not yet, and no, it's not :-) I'll figure it out when landing it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants