无法安装 libboost-all-dev,因为依赖项未安装

无法安装 libboost-all-dev,因为依赖项未安装

我正在尝试安装libboost-all-dev,但

$ sudo apt-get install libboost-all-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:
 libboost-all-dev : Depends: libboost-date-time-dev but it is not going to be installed
                    Depends: libboost-filesystem-dev but it is not going to be installed
                    Depends: libboost-iostreams-dev but it is not going to be installed
                    Depends: libboost-log-dev but it is not going to be installed
                    Depends: libboost-system-dev but it is not going to be installed
                    Depends: libboost-thread-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.

我已经尝试设置-f标志

sudo apt-get -f install libboost-all-dev 

没有成功。我不知道这里的问题是什么。

答案1

确保你运行

sudo apt-get update
sudo apt-get dist-upgrade

让您的软件包保持最新。尝试

sudo apt-get purge libboost-all-dev

删除包含所有附加文件的包,然后使用

sudo apt-get install -f libboost-all-dev

用于重新安装所有内容。

相关内容