Because geth deprecated the command-line compiler interface after version 1.6, I was puzzled for a long time.I wrote a simple tutorial to describe how to compile and deploy a contract after geth1.6.
Hope this tutorial will help you.
http://blog.csdn.net/weixin_40401264/article/details/78136346