最近,我将 Ubuntu 从 18.04 LTS 升级到了 18.10。这也将我的 PHP 7.1 升级到了此版本:PHP 7.1.28-1+ubuntu18.04.1+deb.sury.org+3
。现在,我必须降级到 PHP 7.1.27,因为 7.1.28 引入了一些重大更改,导致我的 Symfony 项目无法运行。
我一直在努力降级,但没有成功。似乎没有低于该版本的东西可用:
$ apt-cache policy php7.1
php7.1:
Installed: 7.1.28-1+ubuntu18.04.1+deb.sury.org+3
Candidate: 7.1.29-1+ubuntu18.10.1+deb.sury.org+1
Version table:
7.1.29-1+ubuntu18.10.1+deb.sury.org+1 500
500 http://ppa.launchpad.net/ondrej/php/ubuntu cosmic/main amd64 Packages
500 http://ppa.launchpad.net/ondrej/php/ubuntu cosmic/main i386 Packages
*** 7.1.28-1+ubuntu18.04.1+deb.sury.org+3 100
100 /var/lib/dpkg/status
$ apt-cache madison php7.1
php7.1 | 7.1.29-1+ubuntu18.10.1+deb.sury.org+1 | http://ppa.launchpad.net/ondrej/php/ubuntu cosmic/main amd64 Packages
php7.1 | 7.1.29-1+ubuntu18.10.1+deb.sury.org+1 | http://ppa.launchpad.net/ondrej/php/ubuntu cosmic/main i386 Packages
$ apt-cache showpkg php7.1
Package: php7.1
Versions:
7.1.29-1+ubuntu18.10.1+deb.sury.org+1 (/var/lib/apt/lists/ppa.launchpad.net_ondrej_php_ubuntu_dists_cosmic_main_binary-amd64_Packages) (/var/lib/apt/lists/ppa.launchpad.net_ondrej_php_ubuntu_dists_cosmic_main_binary-i386_Packages)
Description Language:
File: /var/lib/apt/lists/ppa.launchpad.net_ondrej_php_ubuntu_dists_cosmic_main_binary-amd64_Packages
MD5: 86488d7a405bdcbac9ece7c307f30abb
Description Language: en
File: /var/lib/apt/lists/ppa.launchpad.net_ondrej_php_ubuntu_dists_cosmic_main_i18n_Translation-en
MD5: 86488d7a405bdcbac9ece7c307f30abb
Description Language:
File: /var/lib/dpkg/status
MD5: 86488d7a405bdcbac9ece7c307f30abb
7.1.28-1+ubuntu18.04.1+deb.sury.org+3 (/var/lib/dpkg/status)
Description Language:
File: /var/lib/apt/lists/ppa.launchpad.net_ondrej_php_ubuntu_dists_cosmic_main_binary-amd64_Packages
MD5: 86488d7a405bdcbac9ece7c307f30abb
Description Language: en
File: /var/lib/apt/lists/ppa.launchpad.net_ondrej_php_ubuntu_dists_cosmic_main_i18n_Translation-en
MD5: 86488d7a405bdcbac9ece7c307f30abb
Description Language:
File: /var/lib/dpkg/status
MD5: 86488d7a405bdcbac9ece7c307f30abb
Reverse Depends:
Dependencies:
7.1.29-1+ubuntu18.10.1+deb.sury.org+1 - libapache2-mod-php7.1 (16 (null)) php7.1-fpm (16 (null)) php7.1-cgi (0 (null)) php7.1-common (0 (null))
7.1.28-1+ubuntu18.04.1+deb.sury.org+3 - libapache2-mod-php7.1 (16 (null)) php7.1-fpm (16 (null)) php7.1-cgi (0 (null)) php7.1-common (0 (null))
Provides:
7.1.29-1+ubuntu18.10.1+deb.sury.org+1 - php (= )
7.1.28-1+ubuntu18.04.1+deb.sury.org+3 - php (= )
Reverse Provides:
那么我该如何降级呢?不必严格按照 7.1.27 版本,只要低于 7.1.28 版本就可以。