无法安装boost ubuntu 13.10

时间:2014-03-26 01:24:10

标签: c++ ubuntu boost

我正在尝试将boost安装到我的32位Ubuntu 13.10系统上。但是,当我跑:

sudo apt-get install libboost-all-dev

我明白了:

The following packages have unmet dependencies.
libboost-all-dev : Depends: libboost-graph-parallel-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
E: Unable to correct problems, you have held broken packages.

为了解决这个问题,我已经完成了:

sudo apt-get remove --purge libboost-all-dev

但它总是带回来

Package 'libboost-all-dev' is not installed, so not removed
The following packages were automatically installed and are no longer required:
binutils-dev cmake cmake-data comerr-dev expect grive krb5-multidev
libboost-filesystem-dev libboost-program-options-dev libboost-test-dev
libcurl4-openssl-dev libexpat1-dev libgcrypt11-dev libgnutls-dev
libgnutlsxx27 libgpg-error-dev libgssrpc4 libidn11-dev libjson-c-dev
libjson0-dev libkadm5clnt-mit8 libkadm5srv-mit8 libkdb5-6 libkrb5-dev
libldap2-dev libp11-kit-dev librtmp-dev libssl-dev libssl-doc libtasn1-3-dev
libyajl-dev

没有任何改变。

有什么想法吗?

3 个答案:

答案 0 :(得分:3)

首先使用

删除损坏的包裹
$>sudo apt-get install -f
$>sudo dpkg --configure -a
$>sudo apt-get --fix-broken install
$>sudo apt-get --fix-missing install
$>sudo apt-get clean
$>sudo apt-get autoclean
$>sudo apt-get autoremove

然后升级/更新包基,

$>sudo apt-get update
$>sudo apt-get upgrade 

然后,

$>sudo apt-get install libboost-all-dev

如果错误仍然存​​在,那么

$> sudo apt-get install <here goes the dependent pkg, in your case here, 'libboost-graph-parallel-dev' etc.>

这应该可以正常工作。如果仍然出现包装损坏的错误,则必须检查

  

的/ var / lib中/ dpkg的/状态

档案&amp;检查包装是否破损,然后将其取下。

有关详细信息,请查看here

答案 1 :(得分:2)

这些都不起作用。
有什么工作是安装symantec软件包管理器并手动完成并删除损坏的软件包。

删除所有损坏的包后,安装按预期工作 谢谢你的帮助。

答案 2 :(得分:2)

我遇到了同样的问题,我找到了答案。 只需运行以下

$ sudo apt-get remove libboost1.55-all-dev
$ sudo apt-get autoremove