【问题标题】:Dependency failure while installing libboost-all-dev on ubuntu core 14.04在 ubuntu core 14.04 上安装 libboost-all-dev 时依赖失败
【发布时间】:2015-03-10 07:55:48
【问题描述】:

有人知道为什么我在“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.

我能做些什么来改变它?

【问题讨论】:

  • 在这种情况下,首先尝试安装依赖项。这将显示一个更详细的问题。
  • 尝试使用 sudo apt-get install -f
  • 尝试安装依赖后的响应:以下包有未满足的依赖: libboost-context1.54-dev : Depends: libboost1.54-dev (= 1.54.0-4ubuntu3) but 1.54. 0-4ubuntu3.1要安装
  • sudo apt-get install -f -> 不工作

标签: linux boost embedded-linux ubuntu-14.04


【解决方案1】:

您可以使用 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

【讨论】:

    【解决方案2】:

    我刚刚遇到了完全相同的软件包的问题,​​但这是一个反复出现的问题。我已经使用以下方法解决了这个问题(安装 libboost-all-dev)。这有点乏味,但在大约 5 到 10 分钟内可以正常工作(取决于依赖项的数量)。事实上,您几乎已经完成了解决方案。

    对于未满足的依赖项列表中的每个包,您必须遵循依赖项,直到找到无法安装的包,因为它有另一个更新的包可用。然后使用 apt-get 的 = 符号强制将其安装在降级版本中。例如,在您的情况下: apt-get install libboost1.54-dev=1.54.0-4ubuntu3

    完成所有依赖项后,您就可以安装主包 (libboost-all-dev)。

    我不知道是否有更好(更快)的方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-31
      • 2015-06-08
      • 1970-01-01
      • 2015-09-25
      • 2019-03-28
      • 1970-01-01
      • 1970-01-01
      • 2016-02-29
      相关资源
      最近更新 更多