我不得不在我的服务器上进行 Debian dist-upgrade……在此过程中,PHP 升级到 5.4。我们使用的 ioncube 最多只支持 5.3 atm,我在寻找如何从 5.4 降级到 5.3 时遇到了一些麻烦。有谁知道怎么做?
小智 11
上述两种解决方案都不适合我。什么工作是将必要的包固定到旧的稳定器上,例如
将以下内容添加到 /etc/apt/sources.lst
deb http://ftp.us.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.us.debian.org/debian/ squeeze main contrib non-free
Run Code Online (Sandbox Code Playgroud)
创建
/etc/apt/preferences.d/preferences
并添加您需要降级的软件包,例如在我的情况下
Package: php5*
Pin: release a=oldstable
Pin-Priority: 700
Package: libapache2-mod-php5
Pin: release a=oldstable
Pin-Priority: 700
Package: libapache2-mod-php5
Pin: release a=oldstable
Pin-Priority: 700
Package: php-pear
Pin: release a=oldstable
Pin-Priority: 700
Package: *
Pin: release a=stable
Pin-Priority: 600
Run Code Online (Sandbox Code Playgroud)
然后运行命令
aptitude update
aptitude reinstall <necessary packages>
/etc/init.d/apache2 restart
Run Code Online (Sandbox Code Playgroud)
如果您想知道需要升级哪些软件包,只需运行:
dpkg -l|grep php|grep 5.4|awk '{print $2}'
Run Code Online (Sandbox Code Playgroud)