依赖项导致 apt-get 无法安装 gcc/g++

依赖项导致 apt-get 无法安装 gcc/g++

我一直在尝试运行apt-get install gcc-4.8 g++-4.8以便可以安装该build-essential软件包。

当我尝试安装 gcc/g++ 时出现此错误:

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:
 gcc-4.8 : Depends: binutils (>= 2.23.90.20131017) but 2.23.52.20130913-0ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.

我不认为我损坏了软件包。我也尝试在 aptitude 中安装这些软件包,但没有任何效果。

答案1

你有没有尝试过:

sudo apt-get install -f
sudo apt-get update

如果不起作用请尝试:

sudo apt-get install ppa-purge 
sudo ppa-purge ppa:ubuntu-toolchain-r/test

进入软件源并确保已启用宇宙和多元宇宙存储库,然后

sudo apt-get update

然后尝试再次安装

sudo apt-get install gcc-4.8 g++-4.8

并请列出你的 sources.list 文件

相关内容