-1

i want to install nvm to my ubuntu, but i think there is network problem

to install nvm i use this code :

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

output error:

    % 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:19 --:--:--     0curl: (6) Could not resolve host: raw.githubusercontent.com

and it's always error in nineteen seconds, btw i use windows subsystem for linux

is there any way to fix this?

Abr
  • 25
  • 4
  • Please note that Stack Overflow is for programming questions and not general computing issues. Please review [What topics can I ask here?](https://stackoverflow.com/help/on-topic) for more details. Question may be appropriate for [Ask Ubuntu](http://askubuntu.com) or [Unix & Linux](http://unix.stackexchange.com) but do check their help before posting. – kaylum May 04 '20 at 04:24
  • @kaylum, people can ask such questions. Previously have been asked.. https://stackoverflow.com/questions/41570364/npm-install-not-working-in-windows –  May 04 '20 at 04:30
  • People can but they shouldn't. Just because someone else breaks the rules doesn't mean it is ok for anyone else to do the same. Please read the link given as that is the official Stack Overflow rules. – kaylum May 04 '20 at 04:32

1 Answers1

0

use the command to download the file and save it as install.sh curl -x -o install.sh https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh

Give it necessary permissions using chmod +x install.sh And then run it as ./install.sh

WSL uses a sandbox environment to run the applications which would explain the proxy error with curl. windows has ported curl into an exe, so you can directly invoke the curl.exe to download your file.

curl.exe -o install.sh https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh

0xblaze
  • 1
  • 1
  • i get this error when to download and install as install.sh : curl: (5) Could not resolve proxy: -o curl: (5) Could not resolve proxy: -o – Abr May 04 '20 at 05:10
  • WSL uses a sandbox environment to run the applications, windows has ported curl into an exe, so you can directly invoke the `curl.exe` to download your file. `curl.exe -o install.sh https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh` This should do the trick – 0xblaze May 04 '20 at 09:26
  • i got this ouput : % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 13527 100 13527 0 0 13527 0 0:00:01 --:--:-- 0:00:01 37575 . but when i run 'command -v nvm' there is no output 'nvm' – Abr May 06 '20 at 07:56
  • you still have to run the install script you downloaded. – 0xblaze May 06 '20 at 11:28