CentOS 7.6
我已经在 5.x 版本和 7.2 上运行了相同的过程而没有问题,但是在 7.4 中一些 pear/pecl 步骤失败了,因为我现在正在尝试从 7.2 升级迁移。
在配置过程中,我从 pecl 运行 timezonedb 升级并遇到错误:
[root@d9471f6a1ab2 /]# pear upgrade -c pecl.php.net timezonedb
downloading timezonedb-2019.3.tgz ...
Starting to download timezonedb-2019.3.tgz (413,166 bytes)
....................................................................................done: 413,166 bytes
5 source files, building
running: phpize
Can't find PHP headers in /usr/include/php
The php-devel package is required for use of this command.
ERROR: `phpize' failed
所以我很自然地尝试安装它要求的包
php-devel
但是它试图将我现有的一些软件包降级回 php5.4!yum install php-devel
...
Error: php73-cli conflicts with php-cli-5.4.16-46.1.el7_7.x86_64
Error: php73-common conflicts with php-common-5.4.16-46.1.el7_7.x86_64
我构建 php 运行时的正常过程包括安装
timezonedb
。 pecl 包并在配置过程中对其进行升级。这个过程在以前的所有 PHP 升级中没有太大变化,但我在 php7.4 上遇到了一些问题The full package list is included below, but most importantly, I have the following installed:
php74-php-pear
php74-php-devel
这是
yum list installed php*
的输出[root@d9471f6a1ab2 /]# yum list installed php*
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
* base: mirror.fileplanet.com
* epel: mirror.prgmr.com
* extras: mirror.hostduplex.com
* remi-safe: mirrors.mediatemple.net
* updates: repos.lax.quadranet.com
Installed Packages
php-cli.x86_64 5.4.16-46.1.el7_7 @updates
php-common.x86_64 5.4.16-46.1.el7_7 @updates
php-devel.x86_64 5.4.16-46.1.el7_7 @updates
php74-php-bcmath.x86_64 7.4.1-1.el7.remi @remi-safe
php74-php-cli.x86_64 7.4.1-1.el7.remi @remi-safe
php74-php-common.x86_64 7.4.1-1.el7.remi @remi-safe
php74-php-devel.x86_64 7.4.1-1.el7.remi @remi-safe
php74-php-fpm.x86_64 7.4.1-1.el7.remi @remi-safe
php74-php-gd.x86_64 7.4.1-1.el7.remi @remi-safe
php74-php-intl.x86_64 7.4.1-1.el7.remi @remi-safe
php74-php-json.x86_64 7.4.1-1.el7.remi @remi-safe
php74-php-mbstring.x86_64 7.4.1-1.el7.remi @remi-safe
php74-php-opcache.x86_64 7.4.1-1.el7.remi @remi-safe
php74-php-pdo.x86_64 7.4.1-1.el7.remi @remi-safe
php74-php-pear.noarch 1:1.10.10-4.el7.remi @remi-safe
php74-php-pecl-geoip.x86_64 1.1.1-11.el7.remi @remi-safe
php74-php-pecl-igbinary.x86_64 3.1.0-1.el7.remi @remi-safe
php74-php-pecl-imagick.x86_64 3.4.4-6.el7.remi @remi-safe
php74-php-pecl-msgpack.x86_64 2.1.0~beta1-1.el7.remi @remi-safe
php74-php-pecl-redis5.x86_64 5.1.1-1.el7.remi @remi-safe
php74-php-pecl-xdebug.x86_64 2.9.0-1.el7.remi @remi-safe
php74-php-pecl-zip.x86_64 1.15.5-1.el7.remi @remi-safe
php74-php-pgsql.x86_64 7.4.1-1.el7.remi @remi-safe
php74-php-process.x86_64 7.4.1-1.el7.remi @remi-safe
php74-php-soap.x86_64 7.4.1-1.el7.remi @remi-safe
php74-php-xml.x86_64 7.4.1-1.el7.remi @remi-safe
php74-runtime.x86_64 1.0-1.el7.remi @remi-safe
这是我的 repo :
* base: mirror.fileplanet.com
* epel: mirror.prgmr.com
* extras: mirror.hostduplex.com
* remi-safe: mirrors.mediatemple.net
* updates: repos.lax.quadranet.com
最佳答案
1/timezonedb
扩展没有用。
RPM 包使用系统 tzdata
, 单独更新。
2/你对包名感到困惑
php74-php-*
包是为并行设计的软件集合安装倍数版本
php-*
软件包更易于用作单个/默认版本 如 FAQ 中所述,如果您关注 wizard指示。
3/不需要从源代码构建
最有用的扩展以二进制包的形式提供,见 full list
4/符号链接(symbolic link)和环境
如果你真的更喜欢 SCL 包 (php74-php-*),你可以简单地使用命令设置环境
module load php74
由于 SCL 是为多个版本设计的,这允许从一个版本切换到另一个版本
如果你想让一个集合成为默认集合,你可以安装
php74-syspaths
包但同样,使用
php-*
更简单包
关于php - CentOS PHP 7.4 升级 pecl/pear 包时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59619522/