Installing DFX (I tried different versions) freezes in Ubuntu

I’m using Ubuntu 2 in Windows 11 (WSL2). I tried different versions but each time the installation stoppped almost at the same step. Could someone help me?

~$ DFX_VERSION=0.9.3 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
info: Executing dfxvm install script, commit: 792adb8bbf03017a549fefecaeaaa370b8f2f2fc
info: Downloading latest release...
info: Checking integrity of tarball...
dfxvm-x86_64-unknown-linux-gnu.tar.gz: OK

Welcome to dfxvm!

This will install dfxvm, and download and install dfx.

The dfxvm and dfx commands will be added to the following directory:

  /home/sasan/.local/share/dfx/bin

This path will then be added to your PATH environment variable by
modifying the profile files located at:

  /home/sasan/.profile
  /home/sasan/.bashrc

Current installation options:

           dfx version: 0.9.3
  modify PATH variable: yes

Proceed with installation?: Proceed with installation (default)

info: creating /home/sasan/.local/share/dfx/env
info: installing dfx 0.9.3
info: downloading https://github.com/dfinity/sdk/releases/download/0.9.3/dfx-x86_64-unknown-linux-gnu.tar.gz.sha256
 [00:00:01] [###################################################################################] 102B/102B (91B/s, 0s)info: downloaded https://github.com/dfinity/sdk/releases/download/0.9.3/dfx-x86_64-unknown-linux-gnu.tar.gz.sha256
info: downloading https://github.com/dfinity/sdk/releases/download/0.9.3/dfx-x86_64-unknown-linux-gnu.tar.gz
⠉ [00:00:10] [#####>-------------------------------------------------------------------] 23.14MB/299.06MB (2.23MB/s, 2m)

So you’re saying it freezes while downloading? In that case that’s an issue with WSL and not something I can help with

1 Like

But the thing is, I downloaded and installed many other packages without any issues. Do you still think it’s WSL’s issue? Thanks for your help.

The install script does nothing fancy to download the files. IIRC it’s simply a curl call.

On second thought, there’s one more common problem: quite a few ISPs (e.g. one of the largest ones in India) try to stop people from connecting to raw.githubusercontent.com. So maybe try to use a VPN as well

1 Like

On a fresh install of Ubuntu works just fine.

Don’t have access to wsl for now, maybe others can check.

Using VPN solved my problem. I had no idea that I might need to use VPN in Sweden. Thanks for the suggestion.

1 Like

I think I had this issue when I wiped my computer and re-installed everything. For me it was a WSL2 issue not DFX. IIRC there are a couple of WSL apps on windows - I just tried the other one…

The one I’m using is by Canonical Group Limited. Version 2204.3.49.0 and it seems to work well

Could you share the ISP for future reference ? Thanks. FYI I have a vpn running in Göteborg with Telia.