我正在尝试更新一个生产web服务器(在linode)从php 7.1到8.1,按照配置向导的说明,但似乎有一个依赖树错误,我犹豫使用--skip-broken
以防它打破我的web服务器。这是最好的办法吗?如果更新后无法解决依赖关系,我可以轻松地恢复更新吗?我应该更新到最近的7吗?先用X版本?以下是yum update
的输出:
sudo yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: atl.mirrors.clouvider.net
* epel: d2lzkl7pfhq30w.cloudfront.net
* extras: mirrors.linode.com
* remi-php81: mirror.pit.teraswitch.com
* updates: mirrors.linode.com
remi-php81
remi-php81/primary_db
Resolving Dependencies
--> Running transaction check
---> Package php-cli.x86_64 0:7.1.33-19.el7.remi will be updated
---> Package php-cli.x86_64 0:8.1.6-1.el7.remi will be an update
---> Package php-common.x86_64 0:7.1.33-19.el7.remi will be updated
--> Processing Dependency: php(api) = 20160303-64 for package: php-pecl-apcu-bc-1.0.5-1.el7.remi.7.1.x86_64
--> Processing Dependency: php(zend-abi) = 20160303-64 for package: php-pecl-apcu-bc-1.0.5-1.el7.remi.7.1.x86_64
---> Package php-common.x86_64 0:8.1.6-1.el7.remi will be obsoleting
---> Package php-fpm.x86_64 0:7.1.33-19.el7.remi will be updated
---> Package php-fpm.x86_64 0:8.1.6-1.el7.remi will be an update
---> Package php-gd.x86_64 0:7.1.33-19.el7.remi will be updated
---> Package php-gd.x86_64 0:8.1.6-1.el7.remi will be an update
--> Processing Dependency: libgd.so.103()(64bit) for package: php-gd-8.1.6-1.el7.remi.x86_64
---> Package php-json.x86_64 0:7.1.33-19.el7.remi will be obsoleted
---> Package php-mbstring.x86_64 0:7.1.33-19.el7.remi will be updated
---> Package php-mbstring.x86_64 0:8.1.6-1.el7.remi will be an update
--> Processing Dependency: libonig.so.105()(64bit) for package: php-mbstring-8.1.6-1.el7.remi.x86_64
---> Package php-mcrypt.x86_64 0:7.1.33-19.el7.remi will be obsoleted
---> Package php-mysqlnd.x86_64 0:7.1.33-19.el7.remi will be updated
---> Package php-mysqlnd.x86_64 0:8.1.6-1.el7.remi will be an update
---> Package php-opcache.x86_64 0:7.1.33-19.el7.remi will be updated
---> Package php-opcache.x86_64 0:8.1.6-1.el7.remi will be an update
---> Package php-pdo.x86_64 0:7.1.33-19.el7.remi will be updated
---> Package php-pdo.x86_64 0:8.1.6-1.el7.remi will be an update
---> Package php-pecl-apcu.x86_64 0:5.1.21-1.el7.remi.7.1 will be updated
---> Package php-pecl-apcu.x86_64 0:5.1.21-1.el7.remi.8.1 will be an update
---> Package php-pecl-igbinary.x86_64 0:3.2.7-1.el7.remi.7.1 will be updated
---> Package php-pecl-igbinary.x86_64 0:3.2.7-1.el7.remi.8.1 will be an update
---> Package php-pecl-mcrypt.x86_64 0:1.0.5-1.el7.remi.8.1 will be obsoleting
---> Package php-pecl-memcache.x86_64 0:4.0.5.2-1.el7.remi.7.1 will be updated
---> Package php-pecl-memcache.x86_64 0:8.0-3.el7.remi.8.1 will be an update
---> Package php-pecl-memcached.x86_64 0:3.2.0-1.el7.remi.7.1 will be updated
---> Package php-pecl-memcached.x86_64 0:3.2.0-1.el7.remi.8.1 will be an update
---> Package php-pecl-mongodb.x86_64 0:1.11.1-1.el7.remi.7.1 will be updated
---> Package php-pecl-mongodb.x86_64 0:1.13.0-1.el7.remi.8.1 will be an update
---> Package php-pecl-msgpack.x86_64 0:2.1.2-1.el7.remi.7.1 will be updated
---> Package php-pecl-msgpack.x86_64 0:2.2.0~RC1-4.el7.remi.8.1 will be an update
---> Package php-pecl-redis.x86_64 0:3.1.6-1.el7.remi.7.1 will be obsoleted
---> Package php-pecl-redis5.x86_64 0:5.3.7-1.el7.remi.8.1 will be obsoleting
--> Processing Dependency: liblzf.so.1()(64bit) for package: php-pecl-redis5-5.3.7-1.el7.remi.8.1.x86_64
--> Processing Dependency: libzstd.so.1()(64bit) for package: php-pecl-redis5-5.3.7-1.el7.remi.8.1.x86_64
---> Package php-pgsql.x86_64 0:7.1.33-19.el7.remi will be updated
---> Package php-pgsql.x86_64 0:8.1.6-1.el7.remi will be an update
---> Package php-process.x86_64 0:7.1.33-19.el7.remi will be updated
---> Package php-process.x86_64 0:8.1.6-1.el7.remi will be an update
---> Package php-xml.x86_64 0:7.1.33-19.el7.remi will be updated
---> Package php-xml.x86_64 0:8.1.6-1.el7.remi will be an update
--> Running transaction check
---> Package liblzf.x86_64 0:3.6-7.el7 will be installed
---> Package libzstd.x86_64 0:1.5.2-1.el7 will be installed
---> Package php-common.x86_64 0:7.1.33-19.el7.remi will be updated
--> Processing Dependency: php(api) = 20160303-64 for package: php-pecl-apcu-bc-1.0.5-1.el7.remi.7.1.x86_64
--> Processing Dependency: php(zend-abi) = 20160303-64 for package: php-pecl-apcu-bc-1.0.5-1.el7.remi.7.1.x86_64
---> Package php-gd.x86_64 0:8.1.6-1.el7.remi will be an update
--> Processing Dependency: libgd.so.103()(64bit) for package: php-gd-8.1.6-1.el7.remi.x86_64
---> Package php-mbstring.x86_64 0:8.1.6-1.el7.remi will be an update
--> Processing Dependency: libonig.so.105()(64bit) for package: php-mbstring-8.1.6-1.el7.remi.x86_64
--> Finished Dependency Resolution
Error: Package: php-pecl-apcu-bc-1.0.5-1.el7.remi.7.1.x86_64 (@remi-php71)
Requires: php(api) = 20160303-64
Removing: php-common-7.1.33-19.el7.remi.x86_64 (@remi-php71)
php(api) = 20160303-64
Updated By: php-common-8.1.6-1.el7.remi.x86_64 (remi-php81)
php(api) = 20210902-64
Available: php-common-5.4.16-48.el7.x86_64 (base)
php(api) = 20100412-64
Available: php-common-8.1.5-1.el7.remi.x86_64 (remi-php81)
php(api) = 20210902-64
Error: Package: php-gd-8.1.6-1.el7.remi.x86_64 (remi-php81)
Requires: libgd.so.103()(64bit)
Error: Package: php-pecl-apcu-bc-1.0.5-1.el7.remi.7.1.x86_64 (@remi-php71)
Requires: php(zend-abi) = 20160303-64
Removing: php-common-7.1.33-19.el7.remi.x86_64 (@remi-php71)
php(zend-abi) = 20160303-64
Updated By: php-common-8.1.6-1.el7.remi.x86_64 (remi-php81)
php(zend-abi) = 20210902-64
Available: php-common-5.4.16-48.el7.x86_64 (base)
php(zend-abi) = 20100525-64
Available: php-common-8.1.5-1.el7.remi.x86_64 (remi-php81)
php(zend-abi) = 20210902-64
Error: Package: php-mbstring-8.1.6-1.el7.remi.x86_64 (remi-php81)
Requires: libonig.so.105()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Error: Package: php-pecl-apcu-bc-1.0.5-1.el7.remi.7.1.x86_64 (@remi-php71)
Requires: php(api) = 20160303-64
apcu_bc提供了与PHP 7的旧APC扩展的兼容性。
已弃用,PHP 8不再支持
所以你必须在升级之前删除它,如果你真的需要它,你不能升级,必须在升级之前修复使用它的应用程序。
Error: Package: php-gd-8.1.6-1.el7.remi.x86_64 (remi-php81)
Requires: libgd.so.103()(64bit)
缺失的依赖项在remi-safe在正确的安装中默认启用的存储库,按照向导说明
当然,由于这是一次重大升级,您必须确保所有应用程序都为这个新版本做好准备。