I am getting the following error from solc:

Error: Source file requires different compiler version (current compiler is 0.4.11-develop.2017.6.22+commit.68ef5810.Darwin.appleclang - note that nightly builds are considered to be strictly less than the released version
pragma solidity 0.4.11;

In order to build solc, I:

  1. cloned the solidity repository,
  2. ran git checkout v0.4.11 which successfully got the tag/v0.4.11. 3. completed the build process
  3. made sure solc was in my path

    solc --version
    solc, the solidity compiler commandline interface
    Version: 0.4.11-develop.2017.6.22+commit.68ef5810.Darwin.appleclang

So, that is the v0.4.11 release, but the version number has today's date in it. Is that the source of the error?

System is macOS Sierra 10.12.5.


I solved my problem by RTFM. Mac users should install using Homebrew.

From Installing Solidity

brew update 
brew upgrade
brew tap ethereum/ethereum
brew install solidity
brew linkapps solidity

If you need a specific version of Solidity you can install a Homebrew formula directly from Github.

  • 2
    for ubuntu: sudo npm install -g solc – moshe beeri Nov 7 '17 at 19:11
  • 1
    You can probably accept your own answer then :) – asymmetric Nov 13 '18 at 19:11

To Install specific version of solidity, use :

npm install -g solc@0.4

This will install solidity compiler 0.4.26 (latest on that version), globally.


npm install -g solc@0.5


$ solcjs --version
> 0.4.26+commit.4563c3fc.Emscripten.clang

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.