简体   繁体   English

在ubuntu核心14.04上安装libboost-all-dev时依赖性失败

[英]Dependency failure while installing libboost-all-dev on ubuntu core 14.04

Does someone know why I get the following after "sudo apt-get install libboost-all-dev": 有人知道为什么我在“sudo apt-get install libboost-all-dev”后得到以下内容:

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:
 libboost-all-dev : Depends: libboost-context-dev but it is not going to be installed
                    Depends: libboost-coroutine-dev but it is not going to be installed
                    Depends: libboost-exception-dev but it is not going to be installed
                    Depends: libboost-graph-dev but it is not going to be installed
                    Depends: libboost-graph-parallel-dev but it is not going to be installed
                    Depends: libboost-locale-dev but it is not going to be installed
                    Depends: libboost-log-dev but it is not going to be installed
                    Depends: libboost-math-dev but it is not going to be installed
                    Depends: libboost-mpi-dev but it is not going to be installed
                    Depends: libboost-mpi-python-dev but it is not going to be installed
                    Depends: libboost-random-dev but it is not going to be installed
                    Depends: libboost-signals-dev but it is not going to be installed
                    Depends: libboost-timer-dev but it is not going to be installed
                    Depends: libboost-wave-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

What can I do to change it? 我该怎么做才能改变它?

You can fix it by using aptitude: 您可以使用aptitude修复它:

sudo apt-get install aptitude

sudo aptitude install libboost-all-dev

Accept this solution? [Y/n/q/?] n

The following actions will resolve these dependencies:

Downgrade the following packages:

1)     libboost-date-time1.54.0 [1.54.0-4ubuntu3.1 (now) -> 1.54.0-4ubuntu3 (trusty)]

2)     libboost-python1.54.0 [1.54.0-4ubuntu3.1 (now) -> 1.54.0-4ubuntu3 (trusty)]

3)     libboost-system1.54.0 [1.54.0-4ubuntu3.1 (now) -> 1.54.0-4ubuntu3 (trusty)]

4)     libboost-thread1.54.0 [1.54.0-4ubuntu3.1 (now) -> 1.54.0-4ubuntu3 (trusty)]

5)     libpci3 [1:3.2.1-1ubuntu5.1 (now) -> 1:3.2.1-1ubuntu5 (trusty)]

6)     pciutils [1:3.2.1-1ubuntu5.1 (now) -> 1:3.2.1-1ubuntu5 (trusty)]

Accept this solution? [Y/n/q/?] y

The following packages will be DOWNGRADED:
libboost-date-time1.54.0 libboost-python1.54.0 libboost-system1.54.0 
libboost-thread1.54.0 libpci3 pciutils 

Accept this solution? [Y/n/q/?] y

Do you want to continue? [Y/n/?] y

I have just encountered the problem with the exact same package but it is a recurrent problem. 我刚刚遇到了完全相同的包的问题,​​但它是一个经常出现的问题。 I have solved the problem (installing libboost-all-dev) using the following methodology. 我已使用以下方法解决了问题(安装libboost-all-dev)。 It is a bit tedious but works fine in around 5 to 10 minutes (depending on the number of dependencies). 它有点乏味但在大约5到10分钟内工作正常(取决于依赖项的数量)。 In fact, you had almost done all the way to the solution. 事实上,你几乎已经完成了解决方案。

For each package in your list of unmet dependencies, you have to follow the dependency until you find the package which can not be installed because it has another more recent package available. 对于未满足的依赖项列表中的每个包,您必须遵循相关性,直到找到无法安装的包,因为它有另一个更新的包可用。 Then you force its installation in a downgraded version using the = sign with apt-get. 然后使用带有apt-get的=符号强制安装在降级版本中。 For example in your case: apt-get install libboost1.54-dev=1.54.0-4ubuntu3 例如,在您的情况下:apt-get install libboost1.54-dev = 1.54.0-4ubuntu3

Once you have done all dependencies, you will be able to install your primary package (libboost-all-dev). 完成所有依赖项后,您将能够安装主程序包(libboost-all-dev)。

I do not know if there is a better (faster) way to do it. 我不知道是否有更好(更快)的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM