我输入
sudo apt-get install g++
然后得到输出:
g++ depends on g++-4.8 (>=4.8.2-5~) but it will not be installed
然后我继续
sudo apt-get install g++-4.8
然后得到
g++-4.8 depends on: gcc-4.8-base (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 will be installed
gcc-4.8 (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 will be installed
libstdc++-4.8-dev (= 4.8.2-19ubuntu1) but it will not be installed
然后我输入
sudo apt-get install gcc-4.8-base gcc-4.8 libstdc++-4.8-dev
然后得到
gcc-4.8-base (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 will be installed
libgcc-4.8-dev (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 will be installed
最后
sudo apt-get install libgcc-4.8-dev gcc-4.8-base
并得到
libgcc-4.8-dev is the newest version
gcc-4.8-base is the newest version
那么,我应该删除这些已安装的软件包并用括号中的版本替换吗?有人知道修复方法吗?任何帮助都将不胜感激!
对于任何建议安装 build-essential 的人:这是我得到的
build-essential: depends on g++ (>= 4:4.4.3) but it will not be installed