apt-get 中的依赖解析问题

apt-get 中的依赖解析问题

使用Ubuntu 16.04

列出可用的apache2版本:

root@ubuntu-xenial:~# apt-cache show apache2 | grep Version
Version: 2.4.18-2ubuntu3.9
Version: 2.4.18-2ubuntu3.8
Version: 2.4.18-2ubuntu3

碰巧我想要一个特定的版本(2.4.18-2ubuntu3.8),所以我尝试按照以下命令安装它(结果失败,如下所示):

root@ubuntu-xenial:~# sudo apt-get install apache2=2.4.18-2ubuntu3.8
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:
 apache2 : Depends: apache2-bin (= 2.4.18-2ubuntu3.8) but 2.4.18-2ubuntu3.9 is to be installed
           Depends: apache2-data (= 2.4.18-2ubuntu3.8) but 2.4.18-2ubuntu3.9 is to be installed
           Recommends: ssl-cert but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

为什么不apt-get执行适当的依赖关系解析并安装适当的所需包?

最让我困惑的是这句话:

Depends: apache2-bin (= 2.4.18-2ubuntu3.8) but 2.4.18-2ubuntu3.9 is to be installe

3.9为什么明明需要,却要3.8尝试安装依赖项?

相关内容