我正在尝试安装 openbts,但它需要一堆依赖项,其中一些失败了:
The following packages have unmet dependencies:
libboost-all-dev : Depends: libboost-python-dev but it is not going to be installed
libsqlite3-dev : Depends: libsqlite3-0 (= 3.7.9-2ubuntu1) but 3.7.9-2ubuntu1.1 is to be installed
sqlite3 : Depends: libsqlite3-0 (= 3.7.9-2ubuntu1) but 3.7.9-2ubuntu1.1 is to be installed
我认为我可以以某种方式构造命令以忽略 sqlite 的不同版本并安装它(这样可以吗?)但我不明白 libboost 发生了什么。
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-python-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
apt-get install libboost-python-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-python-dev : Depends: libboost-python1.46-dev but it is not going to be installed
我想我可能安装了不同的版本:
apt-get remove libboost-all-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libboost-all-dev is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 163 not upgraded.
同样如此:
apt-get remove libboost-python-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libboost-python-dev is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 163 not upgraded.
apt-get install libboost-python1.46-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-python1.46-dev : Depends: python-dev but it is not going to be installed
有人能解释一下发生了什么事吗?
答案1
如果你在终端窗口中输入以下内容可能会有所帮助
sudo apt-get -f 安装 libboost-python-dev
sudo apt-get -f install openbts
该-f
选项强制 apt-get 下载所需的依赖项。
答案2
尝试 build-dep 选项,这是摆脱依赖关系噩梦的最佳选择。
sudo apt-get build-dep <package-name>
(在您的情况下是 openbts)
这将自动构建所有必需的依赖项。