当我尝试在我的centos 7上安装PHP 7版本时,但是该软件包来自PHP 5版本,所以我决定将repo rebel更改为Remi,并在收到以下错误后禁用rebel
qybjjes11#
我使用centos:7启动了一个Docker容器,并运行了以下命令:
centos:7
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm yum -y install yum-utils yum-config-manager --disable 'remi-php*' yum-config-manager --enable remi-php74 yum -y update yum -y install php yum -y install php-fpm php-gd php-json php-mbstring php-mysqlnd php-xml php-xmlrpc php-opcache
现在,让我们看看php版本。
php
sh-4.2# php -v PHP 7.4.27 (cli) (built: Dec 14 2021 17:17:06) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.27, Copyright (c), by Zend Technologies sh-4.2# php-fpm -v PHP 7.4.27 (fpm-fcgi) (built: Dec 14 2021 17:17:06) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.27, Copyright (c), by Zend Technologies
1条答案
按热度按时间qybjjes11#
我使用
centos:7
启动了一个Docker容器,并运行了以下命令:现在,让我们看看
php
版本。