为什么构建必不可少?

我找不到解决这个问题的方法:

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)。 谢谢。

运行sudo apt-get install libdpkg-perl=1.17.5ubuntu5降级libdpkg-perl

您以某种方式安装了比存储库中更新版本的软件包,这导致其他软件包出现问题。

试用代码:

 sudo apt-get update 

更新您的包列表。

然后代码:

 sudo apt-get autoclean 

清理任何部分包裹。

然后代码:

 sudo apt-get clean 

清理apt缓存。

然后代码:

 sudo apt-get autoremove 

将清理任何不需要的依赖项。

如果在执行此操作时您可以识别损坏的包,则此代码将非常强制地删除它。

码:

 sudo dpkg --remove -force --force-remove-reinstreq  

当然,将包名更改为真实姓名。

然后,返回构建必备安装

码:

 sudo apt-get install dpkg-dev sudo apt-get install build-essential 

看,这是否适合你。

对我来说,我重新安装了

 libdpkg-perl 

它工作。 如果使用synaptic,您可以允许synaptic降级此包