Skip to content

Instantly share code, notes, and snippets.

@beefy
Created May 1, 2021 01:28
Show Gist options
  • Save beefy/861f47a042dd941bdf7ea971ab1267f3 to your computer and use it in GitHub Desktop.
Save beefy/861f47a042dd941bdf7ea971ab1267f3 to your computer and use it in GitHub Desktop.
Run Solidity Locally Linux/Ubuntu

This also works on WSL2 for windows

https://docs.soliditylang.org/en/latest/installing-solidity.html#building-from-source https://github.com/ethereum/solidity/blob/develop/scripts/install_deps.sh

sudo apt-get update

  • install the metamask chrome extension: https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en
  • install cmake: sudo apt-get install cmake
  • install boost: sudo apt-get install libboost-all-dev
  • install z3: sudo apt-get install z3
  • install cvc4: sudo apt-get install cvc4
  • install gcc: sudo apt-get install build-essential
  • install clang: sudo apt-get install clang
  • install vscode: https://linuxize.com/post/how-to-install-visual-studio-code-on-ubuntu-18-04/
  • download source code: git clone --recursive https://github.com/ethereum/solidity.git
  • build solidity
    • cd solidity-develop
    • mkdir build
    • cd build
    • cmake .. && make
      • if you get an error like: CMake 3.13.0 or higher is required. You are running version 3.10.2
        • sudo apt remove --purge cmake
        • hash -r
        • sudo apt-get install build-essential libssl-dev
        • wget https://github.com/Kitware/CMake/releases/download/v3.16.5/cmake-3.16.5.tar.gz
          • or download with chrome if you get a timeout
          • cp ~/Downloads/cmake-3.16.5.tar.gz .
        • tar -xvzf cmake-3.16.5.tar.gz
        • cd cmake-3.16.5
        • ./bootstrap
        • make
        • sudo make install
    • cd ..
-- Configuring incomplete, errors occurred!
See also "~/solidity-develop/build/CMakeFiles/CMakeOutput.log".
See also "~/solidity-develop/build/CMakeFiles/CMakeError.log".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment