2016-06-22 10 views
1

우분투에 Solidity 컴파일러 (solc)를 설치했습니다. solcGeth에 연결할 수 없습니다.solc를 Geth에 연결할 수 없습니다

어떻게 할 수 있습니까? 다음과 같이

sudo add-apt-repository ppa:ethereum/ethereum 
sudo apt-get update 
sudo apt-get install solc 

이 표시됩니다 :

아래는 내가 수행 한 단계는

> eth.getCompilers() 
['Solidity' ] 

답변

1

당신 때문에 :

> eth.getCompilers() 
[] 

나는 다음과 같이 표시 할 소스를 통해 이미 solc이 설치되어 있다면를 사용하여 찾을 수 있습니다. 10 명령

0 ✓ [email protected] ~ $ which geth 
/usr/bin/geth 
0 ✓ [email protected] ~ $ which solc 
/usr/bin/solc 

그리고 지금 당신이 setSolc() 방법을 사용하여 geth에 추가 할 수 있습니다 :

0 ✓ [email protected] ~ $ 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"] 
> 

은 이제이 연결되어 있습니다. questions tagged with solc on ethereum stack exchange도 참조하십시오.

+1

이 방법은 더 이상 존재하지 않습니다. 이 대답은 사용되지 않습니다. –