缺少awk
报错
Build dependency: Please install GNU 'awk'
解决办法:
安装gawk,而不是awk
apt-get install gawk
安装g++失败
报错:
root@Ubuntu1404:tmp# apt-get install g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
g++ : Depends: g++-4.8 (>= 4.8.2-5~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@Ubuntu1404:tmp#
解决办法:
更新apt-get的源,可以网上找合适的源,也可以用如下的源:
vi /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ trusty main restricteduniverse multiverse
deb http://archive.ubuntu.com/ubuntu/trusty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricteduniverse multiverse
deb http://archive.ubuntu.com/ubuntu/trusty-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricteduniverse multiverse
deb-src http://archive.ubuntu.com/ubuntu/trusty main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricteduniverse multiverse
deb-src http://archive.ubuntu.com/ubuntu/trusty-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricteduniverse multiverse
deb-src http://archive.ubuntu.com/ubuntu/trusty-backports main restricted universe multiverse
更新后再安装即可:
apt-get update
apt-get install g++
原因:
源错误。