sudo apt-get install build-dep gcc
如果出现错误可以
sudo apt-get update
更新后再执行
ubuntu安装gcc
原文:http://www.cnblogs.com/xieweiwei/p/3553832.html