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上遇到了一些麻烦]
完整软件包列表包括在下面,但最重要的是,我安装了以下软件:
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
这是我的仓库:
* base: mirror.fileplanet.com
* epel: mirror.prgmr.com
* extras: mirror.hostduplex.com
* remi-safe: mirrors.mediatemple.net
* updates: repos.lax.quadranet.com
yum -y install \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
https://repo.ius.io/ius-release-el7.rpm \
https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \
http://mirrors.mediatemple.net/remi/enterprise/remi-release-7.rpm
然后至少要安装php74-php-pear
和php74-php-devel
(我需要安装WAY MORE库,但我相信这些都是必需的)]
链接remi安装的梨。不知道为什么一开始就没有发生:
ln -sf /opt/remi/php74/root/usr/bin/pear /usr/bin/pear
然后,我能够做我需要做的事:
pear channel-update pecl.php.net
pear upgrade -c pecl.php.net timezonedb
工作成功。
我认为问题是我运行的梨版本错误,并且新安装的版本未添加到路径中。创建指向路径目录的链接可以解决此问题。