solc-select doesn't recognize already install solc version
solc was installed on my system. Before installing the solc-select, it showed:
$ solc --version
solc, the solidity compiler commandline interface
Version: 0.8.6+commit.11564f7e.Darwin.appleclang
Once I installed solc-select, it didn't recognize my local version:
$ solc --version
No solc version set. Run `solc-select use VERSION` or set SOLC_VERSION environment variable.
While trying to use the local version:
$ solc-select use 0.8.6
You need to install '0.8.6' prior to using it. Use `solc-select install 0.8.6`
So I have to again install and use a solc version using solc-select
Hey @Aniket-Engg! This is by design as part of downloading native binaries for the system. solc-select downloads solc binaries specific to your system, and then overrides solc on your path.
Reference: https://github.com/crytic/solc-select#solc-version-not-changing-after-running-solc-select-use-version-or-setting-solc_version
@NatalieChin80 Can you confirm that solc-select also installs solc on your system with pip3 install solc-select ?
Hey @Aniket-Engg! When you run pip3 install solc-select you're only installing the solc-select wrapper. Once you run solc-select install [VERSION], then solc-select will retrieve & download binaries for your platform hosted by the Solidity team. This is why solc-select does not work on systems which solc is already installed on a system through another method.
Thanks for the info @NatalieChin80 . One last thing: If I run pip3 install solc-select and then solc-select install [VERSION] on a system having none of solc installation, will it go fine?
@Aniket-Engg Yes. This should work.