Apache-2.2

libapache2-mod-php5 更新後解除安裝無法放回

  • February 5, 2014

我使用 Webmin 來管理我的 Ubuntu 12.04 x86_64 機器。昨天,和往常一樣,我收到了更新通知並安裝了它們。在安裝過程中,libapache2-mod-php5已經被解除安裝,從此無法重啟Apache。

當我嘗試重新安裝它時,我收到以下錯誤:

The following packages have unmet dependencies: libapache2-mod-php5 : Depends: apache2-api-20120211 but it is not installable PreDepends: apache2 (>= 2.4)

如果我理解得很好,這意味著我至少需要 Apache 2.4,對吧?

如果是這樣,當我使用似乎與 Apache 2.4 不兼容的 Virtualmin 時,我該如何回滾我的更改?

以下是 dpkg.log 文件的部分內容:

2013-07-30 14:40:30 upgrade bind9 1:9.8.1.dfsg.P1-4ubuntu0.6 1:9.8.1.dfsg.P1-4ubuntu0.7
2013-07-30 14:41:47 upgrade mysql-server 5.5.31-0ubuntu0.12.04.2 5.5.32-0ubuntu0.12.04.1
2013-07-30 14:41:59 upgrade mysql-common 5.5.31-0ubuntu0.12.04.2 5.5.32-0ubuntu0.12.04.1
2013-07-30 14:42:00 upgrade mysql-client 5.5.31-0ubuntu0.12.04.2 5.5.32-0ubuntu0.12.04.1
2013-07-30 14:42:01 upgrade mysql-client-5.5 5.5.31-0ubuntu0.12.04.2 5.5.32-0ubuntu0.12.04.1
2013-07-30 14:42:25 upgrade mysql-server-core-5.5 5.5.31-0ubuntu0.12.04.2 5.5.32-0ubuntu0.12.04.1
2013-07-30 14:45:20 upgrade icedtea-6-jre-cacao 6b27-1.12.5-0ubuntu0.12.04.1 6b27-1.12.6-1ubuntu0.12.04.2
2013-07-30 14:45:23 upgrade openjdk-6-jre-lib 6b27-1.12.5-0ubuntu0.12.04.1 6b27-1.12.6-1ubuntu0.12.04.2
2013-07-30 14:45:27 upgrade icedtea-6-jre-jamvm 6b27-1.12.5-0ubuntu0.12.04.1 6b27-1.12.6-1ubuntu0.12.04.2
2013-07-30 14:45:34 upgrade openjdk-6-jre-headless 6b27-1.12.5-0ubuntu0.12.04.1 6b27-1.12.6-1ubuntu0.12.04.2
2013-07-30 14:45:53 upgrade liblcms2-2 2.2+git20110628-2ubuntu3 2.2+git20110628-2ubuntu3.1
2013-07-30 14:46:09 upgrade libmysqlclient-dev 5.5.31-0ubuntu0.12.04.1 5.5.32-0ubuntu0.12.04.1
2013-07-30 14:46:14 upgrade libmysqlclient18 5.5.31-0ubuntu0.12.04.1 5.5.32-0ubuntu0.12.04.1
2013-07-30 14:46:35 upgrade linux-firmware 1.79.4 1.79.6
2013-07-30 14:47:00 upgrade linux-libc-dev 3.2.0-48.74 3.2.0-51.77
2013-07-30 14:47:10 upgrade openjdk-6-jre 6b27-1.12.5-0ubuntu0.12.04.1 6b27-1.12.6-1ubuntu0.12.04.2
2013-07-30 17:18:55 upgrade libedit2 2.11-20080614-5~precise+1 2.11-20080614-6~precise+1
2013-07-30 17:19:09 install libjson-c2 <none> 0.11-2~precise+1
2013-07-30 17:19:09 upgrade libjson0 0.9-1ubuntu1 0.11-2~precise+1
2013-07-30 17:19:32 upgrade php-apc 3.1.13-1~precise+1 4.0.1-4~precise+1
2013-07-30 17:19:33 install php5-apcu <none> 4.0.1-4~precise+1
2013-07-30 17:19:36 upgrade php5-mysql 5.4.17-1~precise+1 5.5.1+dfsg-1~precise+1
2013-07-30 17:19:38 upgrade php5-imap 5.4.17-1~precise+1 5.5.1+dfsg-1~precise+1
2013-07-30 17:19:40 upgrade php5-ldap 5.4.17-1~precise+1 5.5.1+dfsg-1~precise+1
2013-07-30 17:19:43 remove php5-geoip 1.0.8+repack.1-1~precise+1 <none>
2013-07-30 17:19:45 upgrade php5-mcrypt 5.4.17-1~precise+1 5.5.1+dfsg-1~precise+1
2013-07-30 17:19:46 upgrade php5-curl 5.4.17-1~precise+1 5.5.1+dfsg-1~precise+1
2013-07-30 17:19:48 upgrade php5-sqlite 5.4.17-1~precise+1 5.5.1+dfsg-1~precise+1
2013-07-30 17:19:49 install libvpx1 <none> 1.0.0-1
2013-07-30 17:19:53 upgrade php5-gd 5.4.17-1~precise+1 5.5.1+dfsg-1~precise+1
2013-07-30 17:19:55 upgrade php5-imagick 3.1.0~rc2-1~precise+1 3.1.0~rc2-1~precise+2
2013-07-30 17:19:57 upgrade php5-cli 5.4.17-1~precise+1 5.5.1+dfsg-1~precise+1
2013-07-30 17:20:00 upgrade php5-common 5.4.17-1~precise+1 5.5.1+dfsg-1~precise+1
2013-07-30 17:20:10 upgrade php5-cgi 5.4.17-1~precise+1 5.5.1+dfsg-1~precise+1
2013-07-30 17:20:23 configure php5-cgi 5.5.1+dfsg-1~precise+1 <none>
2013-07-30 17:20:23 status unpacked php5-cgi 5.5.1+dfsg-1~precise+1
2013-07-30 17:20:23 status unpacked php5-cgi 5.5.1+dfsg-1~precise+1
2013-07-30 17:20:23 status half-configured php5-cgi 5.5.1+dfsg-1~precise+1
2013-07-30 17:20:27 status installed php5-cgi 5.5.1+dfsg-1~precise+1
2013-07-30 17:20:28 startup packages remove
2013-07-30 17:20:28 status installed libapache2-mod-php5 5.4.17-1~precise+1
2013-07-30 17:20:28 remove libapache2-mod-php5 5.4.17-1~precise+1 <none>
2013-07-30 17:20:29 install php5-json <none> 1.3.1+dfsg-1~precise+1
2013-07-30 17:20:57 upgrade php-pear 5.4.17-1~precise+1 5.5.1+dfsg-1~precise+1
2013-07-30 17:21:10 upgrade php5 5.4.17-1~precise+1 5.5.1+dfsg-1~precise+1
2013-07-30 17:21:25 install libunistring0 <none> 0.9.3-5
2013-07-30 17:21:27 install libgettextpo0 <none> 0.18.1.1-5ubuntu3
2013-07-30 17:21:28 install libstdc++6-4.6-dev <none> 4.6.3-1ubuntu5
2013-07-30 17:21:29 install g++-4.6 <none> 4.6.3-1ubuntu5
2013-07-30 17:21:31 install g++ <none> 4:4.6.3-1ubuntu5
2013-07-30 17:21:32 install libdpkg-perl <none> 1.16.1.2ubuntu7.1
2013-07-30 17:21:36 install dpkg-dev <none> 1.16.1.2ubuntu7.1
2013-07-30 17:21:39 install build-essential <none> 11.5ubuntu2.1
2013-07-30 17:21:42 install html2text <none> 1.3.2a-15
2013-07-30 17:21:43 install gettext <none> 0.18.1.1-5ubuntu3
2013-07-30 17:21:45 install intltool-debian <none> 0.35.0+20060710.1
2013-07-30 17:21:47 install po-debconf <none> 1.0.16+nmu2ubuntu1

我正在使用儲存庫 ppa:ondrej/php5 以便在 12.04LTS 上執行 php 5.4。

碰巧他們將 PHP 從 5.4.x 升級到 5.5.x,這似乎需要 Apache 2.4,而我有 2.2。我嘗試通過另一個儲存庫升級 Apache,然後是 Virtualmin 需要的一些與 Apache 2.4 不兼容的功能。

所以我解除安裝了 PHP 和 Apache,然後刪除了 2 個儲存庫,並添加了 ppa:ondrej/php5-oldstable,它是 5.4 版,並且將保持不變。見https://launchpad.net/~ondrej/+archive/php5

現在工作正常。

引用自:https://serverfault.com/questions/527631