由于您已经solc
通过源安装,您只需使用以下which
命令找到它:
0 ✓ user@hoster ~ $ which geth
/usr/bin/geth
0 ✓ user@hoster ~ $ which solc
/usr/bin/solc
现在您可以geth
使用以下setSolc()
方法将其添加到:
0 ✓ user@hoster ~ $ geth attach
Welcome to the Geth JavaScript console!
instance: Geth/v1.4.7-stable-667a386d/linux/go1.6.2/JIT
coinbase: 0xfcae7970392f510a985a7eaccd3820b7759d65d9
at block: 1757738 (Thu, 23 Jun 2016 18:33:28 CEST)
datadir: /home/user/.ethereum
modules: admin:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0
> eth.getCompilers()
[]
> admin.setSolc("/usr/bin/solc")
"solc, the solidity compiler commandline interface\nVersion: 0.3.5-5f97274a/Release-Linux/g++/Interpreter\n\npath: /usr/bin/solc"
> eth.getCompilers()
["Solidity"]
>
现在它被链接了。另请参阅在以太坊堆栈交换上标记的问题solc
。