Hi I have been trying to deploy a contract from geth console to the testnet, I established a connection and also mined to make sure its all working... one thing I couldn't do for some reason is use solc in my geth console, whenever I try to compile inside the console I get the error:

solc: exit status 1
Must provide a file

I couldn't figure it out so if anyone may have solved it or encountered it I would be greatful!

Another thing is that when I try to deploy a compiled solidity contract (compiled in an online service) i keep getting the same result

console.log('Contract mined! address: ' + contract.address + 
    ' transactionHash: ' + contract.transactionHash);

Why is there no address here? and no transaction hash?

Anyway thanks for anyone who may help!

  • 1
    Can you provide the full commands you used to compile? Aug 25, 2016 at 12:37
  • I get the same error. I believe something is wrong with my install of solc. why the checkmark though? I doubt this fixes your problem.
    – ZMitton
    Aug 26, 2016 at 6:52
  • i actually dont know how it was checkmarked 0_o i still have a problem with deploying this contract... the commands i used are first creating the vars for the contract and then i just copy the web3 deploy contract and paste it into the command line... if i want to compile on my command line it just wont work Aug 28, 2016 at 8:19
  • As you've been able to deploy, please post your answer.
    – eth
    Sep 1, 2016 at 8:22

1 Answer 1


You need to ensure the following:

  • first, the account you are deploying the contract from in geth is unlocked when making the deployment transaction

In the geth console run:

personal.unlock("0x12345...", "password", "timeout in ms");
  • check if the respective account has sufficient balance to deploy the transaction. You can get the balance of each account by calling checkAllBalances() defined here

The fact that there is no transaction hash can mean the following:

  • the transaction was made but not confirmed
  • an insufficient gas exception has occurred and the transaction was not mined
  • 1
    the problem really was the unlocking of my account thank you! Sep 1, 2016 at 8:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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