我找不到该问题的解决方案:
constantia@constantia:~$ sudo apt-get install build-essential
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:
build-essential : Depends: dpkg-dev (>= 1.13.5) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
constantia@constantia:~$ sudo apt-get install dpkg-dev
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:
dpkg-dev : Depends: libdpkg-perl (= 1.17.5ubuntu5) but 1.17.5ubuntu5.2 is to be installed
Recommends: build-essential but it is not going to be installed
Recommends: fakeroot but it is not going to be installed
Recommends: libalgorithm-merge-perl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
constantia@constantia:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
抱歉,我的问题太愚蠢了。也许有人能解释一下我的问题出在哪里?我根本没碰过系统(新安装的 14.04)。谢谢。
答案1
运行sudo apt-get install libdpkg-perl=1.17.5ubuntu5
降级libdpkg-perl
。
您以某种方式安装了比存储库中版本更新的软件包版本,这导致其他软件包出现问题。
答案2
尝试代码:
sudo apt-get update
更新你的包裹清单。
然后代码:
sudo apt-get autoclean
清理所有不完整的包。
然后代码:
sudo apt-get clean
清理 apt 缓存。
然后代码:
sudo apt-get autoremove
将清除任何不需要的依赖项。
如果在执行此操作时您可以识别损坏的包装,此代码将非常有力地将其删除。
代码:
sudo dpkg --remove -force --force-remove-reinstreq <package name>
当然是将包名称更改为真实名称。
然后,返回到您的 build-essential 安装
代码:
sudo apt-get install dpkg-dev
sudo apt-get install build-essential
看看这是否适合你。
答案3
对我来说,我重新安装了
libdpkg-perl
并且成功了。如果您使用 synaptic,您可以允许 synaptic 降级此软件包