ApeWorX / py-solc-x

Python wrapper and version management tool for the solc Solidity compiler.
https://solcx.readthedocs.io/
MIT License
141 stars 49 forks source link

Coudn't install solidity 0.4.18 following the wiki instructions. #84

Closed ilanDoron closed 4 years ago

ilanDoron commented 4 years ago

Environment information

What was wrong?

when running the install file for solc 0.4.18:

brew install https://github.com/ethereum/homebrew-ethereum/blob/2aea171d7d6901b97d5f1f71bd07dd88ed5dfb42/solidity.rb

I get this:

Updating Homebrew... Warning: Calling Non-checksummed download of solidity formula file from an arbitrary URL is deprecated! Use 'brew extract' or 'brew create' and 'brew tap-new' to create a formula file in a tap on GitHub instead. -#O#- # #
Warning: Calling Non-checksummed download of solidity formula file from an arbitrary URL is deprecated! Use 'brew extract' or 'brew create' and 'brew tap-new' to create a formula file in a tap on GitHub instead. -#O#- # #
Error: solidity: /Users/iland/Library/Caches/Homebrew/Formula/solidity.rb:6: syntax error, unexpected '<' <!DOCTYPE html> ^ /Users/iland/Library/Caches/Homebrew/Formula/solidity.rb:7: syntax error, unexpected '<'

^ /Users/iland/Library/Caches/Homebrew/Formula/solidity.rb:8: syntax error, unexpected '<' ^ /Users/iland/Library/Caches/Homebrew/Formula/solidity.rb:10: syntax error, unexpected '<'
iamdefinitelyahuman commented 4 years ago

Unfortunately I'm not using OSX myself and I'm not familiar with Ruby, so I can't be of much help :(

There is a push to serve precompiled solc binaries for OSX - https://github.com/ethereum/solidity/issues/3168 As soon as that happens I'll convert this package to use them, and this problem should become a thing of the past. In the meantime, I'm really sorry but there's not much I can offer. Possibly someone in the solidity gitter will know how to solve it.

iamdefinitelyahuman commented 4 years ago
cameel commented 4 years ago

@ilanDoron I think that you're just using the wrong URL. The one you posted is a HTML page that includes the whole Github UI. You cannot execute that as Ruby code - that's why you get errors about "unexpected '<'". You need to use a direct link to the raw Ruby file:

https://raw.githubusercontent.com/ethereum/homebrew-ethereum/2aea171d7d6901b97d5f1f71bd07dd88ed5dfb42/solidity.rb

iamdefinitelyahuman commented 4 years ago

@cameel good catch! I've updated the wiki to better emphasize this.

iamdefinitelyahuman commented 4 years ago

Closing this for now, @ilanDoron if you have further issues feel free to re-open or ping me on gitter.