Error installing dfinity SDK

I tried installing dfinity sdk and keep getting this error on windows subsystem for linux.
root@DESKTOP-NIBTLAT:~# install sh -ci “$(curl -fsSL https://internetcomputer.org/install.sh)”
install: invalid option – ‘i’
Try ‘install --help’ for more information.

1 Like

You shouldn’t have “install” at the front of that command, it should be:

sh -ci “$(curl -fsSL https://internetcomputer.org/install.sh)”

Also make sure you’re running WSL v2, since v1 had some issues, see here for how to check: Install WSL | Microsoft Learn

1 Like

I keep getting the same error even after updating to wsl 2

free_will5@DESKTOP-NIBTLAT:~$ sh -ci “$(curl -fsSL https://internetcomputer.org/install.sh)”
info: Executing dfx install script, commit: 809fab6d52fcf418536afe6c5e66a766e6c06c51
warn: Not forcing TLS v1.2, this is potentially less secure
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
curl: (7) Failed to connect to raw.githubusercontent.com port 443 after 4 ms: Connection refused
info: Version found:
info: Creating uninstall script in ~/.cache/dfinity
info: uninstall path=/home/free_will5/.cache/dfinity/uninstall.sh
info: Checking for latest release…
warn: Not forcing TLS v1.2, this is potentially less secure
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 9 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
curl: (22) The requested URL returned error: 404
dfinity-sdk: command failed: downloader https://github.com/dfinity/sdk/releases/download//dfx--x86_64-linux.tar.gz /tmp/tmp.aLy57srRdA/dfx–x86_64-linux.tar.gz
free_will5@DESKTOP-NIBTLAT:~$

This is the critical line. Typically this happens if you run into network problems. So far I always got it to work just by retrying.

Thanks for your response. Is there any other way to download it? I’ve tried this for more than a week now, on two pcs and same results. I’m wondering if there is something else to it.

No alternative ways right now. You could always download the script to disk, print out the relevant URLs, manually download the files and fiddle some more to use the local copies. Not that that is a nice solution, but it might work.

This sounds beyond my competence:) Unless of course I have specific instructions how to do this. Last time I had no issue downloading sdk but as windows crashed, things seem different. I wonder if it has anything to do with the new update. It wasn’t an issue. I wonder if
downloading direct Ubuntu OS would make a difference?

1 Like

I would give it a shot, even though if it works I wouldn’t have the slightest clue why.

Issue solved: It was a China server problem-- China firewall- definitely. Solution was using a vpn that tunneled everything. Then it worked normally.

1 Like