dpkg / apt-get 想要安装和覆盖不同的包

Tom*_*G11 -2 ubuntu dpkg apt

我想安装磅。这样做:

apt-get install pound
Run Code Online (Sandbox Code Playgroud)

产生这个:

root@myhost:~# apt-get install pound
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.2.0-23-generic linux-headers-3.2.0-23
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  pound
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 98.3 kB of archives.
After this operation, 226 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/universe pound amd64 2.5-1.1 [98.3 kB]
Fetched 98.3 kB in 0s (418 kB/s)
Selecting previously unselected package pound.
(Reading database ... 102644 files and directories currently installed.)
Unpacking pound (from .../pound_2.5-1.1_amd64.deb) ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db ...
Setting up mysql-server-5.5 (5.5.32-0ubuntu0.12.04.1) ...

Configuration file `/etc/apparmor.d/usr.sbin.mysqld'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
Run Code Online (Sandbox Code Playgroud)

mysql-server 已安装并正在运行。我不想尝试重新安装它。

Pound 包不需要 mysql-server 作为任何依赖项。

我该如何解决?

我不想升级它,因为这会破坏生产系统。似乎有什么东西卡住了dpkg,迫使安装的任何软件包都强制重新安装或升级 mysql-server。

der*_*ert 6

听起来你会升级你的 mysql-server-5.5 包。该版本与USN-1909-1 中给出的版本匹配,因此听起来您尚未安装安全更新。

您应该查看不同版本的配置文件中的不同之处(D例如,在提示符处按)。然后,正如提示所说,您可以使用 保留当前(该文件的)N版本,使用 接受 Ubuntu 的版本Y,或者使用 启动一个 shell 来自己处理它(例如,合并更改)Z

回应您的更新

在过去的某个时候,有人(您或此框的其他管理员)开始了 MySQL 升级,可能没有注意到。或者,系统配置为自动应用安全更新,而 MySQL 因某种原因失败了。您可以在apt-get输出中看到这一点:

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Run Code Online (Sandbox Code Playgroud)

毫无疑问,如果你检查了dpkg -s mysql-server-5.5,它的状态行就不会是install ok installed

无论如何,第一次发生的事情是 dpkg 实际上从新包中解包了文件(可能也停止了 MySQL,也许这就是它被中止的原因)。它尝试“配置”MySQL,但在此期间出错,或被中止。

apt正在尝试通过配置包来解决这个问题。您可能可以通过dpkg -i直接使用来绕过它(尽管dpkg也可以尝试配置它,我不确定)

真正的解决方法是您需要安排一些停机时间并完成 MySQL 升级(并注意可能存在配置错误)。特别是因为您正在运行的版本(根据 Oracle 的说法)存在可能损害机密性和完整性的远程漏洞。