solc-select icon indicating copy to clipboard operation
solc-select copied to clipboard

[Bug-Candidate]: Unable to install solc versions on wsl ubuntu 20.04.06

Open JacobYiu opened this issue 2 years ago • 5 comments

Describe the issue:

Hi, I have successfully downloaded solc-select. I have added ppa for ethereum however, I am unable to download any compiler versions for solc. When I use the command solc-select install 0.8.20. It just hangs there indefinitely after 10 minutes of waiting which I am quite confident that should not happen.

Code example to reproduce the issue:

N/A

Version:

0.2.0 Screenshot 2023-12-12 121249

Relevant log output:

No response

JacobYiu avatar Dec 12 '23 12:12 JacobYiu

Hi! Does your network connectivity in WSL work fine otherwise? Can you confirm both the following commands work and show you some JSON?

curl https://raw.githubusercontent.com/crytic/solc/new-list-json/linux/amd64/list.json -v
curl https://binaries.soliditylang.org/linux-amd64/list.json -v

If that works, can you confirm this downloads a binary correctly?

curl https://binaries.soliditylang.org/linux-amd64/solc-linux-amd64-v0.8.20+commit.a1b79de6 -o test -v

elopez avatar Dec 12 '23 12:12 elopez

Hi, it seems when I run this command curl https://raw.githubusercontent.com/crytic/solc/new-list-json/linux/amd64/list.json -v

It works as expected. However when I try to run this command,

curl https://binaries.soliditylang.org/linux-amd64/list.json -v It does not work

JacobYiu avatar Dec 12 '23 12:12 JacobYiu

If you have the possibility, could you try with a different internet provider/internet connection? Unfortunately that server that does not seem to work from your computer is an external server we don't have control over.

elopez avatar Dec 12 '23 12:12 elopez

Hi! Does your network connectivity in WSL work fine otherwise? Can you confirm both the following commands work and show you some JSON?

curl https://raw.githubusercontent.com/crytic/solc/new-list-json/linux/amd64/list.json -v
curl https://binaries.soliditylang.org/linux-amd64/list.json -v

If that works, can you confirm this downloads a binary correctly?

curl https://binaries.soliditylang.org/linux-amd64/solc-linux-amd64-v0.8.20+commit.a1b79de6 -o test -v

I am able to do all three of these things and am also encountering this same problem. I'm not using WSL Ubuntu, but I am running it in a VirtualBox VM. I've tried completely removing all forms of solc from my computer, whether it be installed from snap, npm, solc-select, etc. I've purged it all. which solc, which solcjs, and which solc-select all return nothing. When I perform a clean install of solc-select with pip3 install solc-select, it takes a while but eventually goes through. I then run solc --version to see that solc 0.8.20 is installed instead of the newest 0.8.23 version. When I run solc-select install or solc-select use 0.8.23 --always-install, it just hangs forever as described in the original issue.

Zodomo avatar Dec 15 '23 18:12 Zodomo

The http proxy setting in Windows CMD works for me. I encountered the same situation when connecting to an Ubuntu server using my personal computer(Windows). This can serve as a reference for everyone.

  1. As mentioned in the previous comment, make sure this command works in your personal computercurl https://binaries.soliditylang.org/linux-amd64/list.json -v
  2. Retrieve your own computer's IP by running ipconfig on your computer and confirm a proxy port. For example, 127.0.0.1:10809
  3. To set up a proxy in Ubuntu Server, enter the following command: EXTERNAL_PROXY="http://127.0.0.1:10809" export HTTP_PROXY="$EXTERNAL_PROXY" export http_proxy="$EXTERNAL_PROXY" export HTTPS_PROXY="$EXTERNAL_PROXY"
    export https_proxy="$EXTERNAL_PROXY"

Next, you can successfully run it in the terminal of the Ubuntu server.

HOLLYwyh avatar May 17 '24 06:05 HOLLYwyh

Closing this issue as it has not had activity for a while. If you are still experiencing issues on the latest release feel free to create a new issue.

elopez avatar Jan 02 '25 12:01 elopez