我有一个具有以下设置的环境:
我安装了php,如下所示:
sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf -y install http://rpms.remirepo.net/enterprise/remi-release-8.rpm
sudo dnf -y install php74 php74-php-common php74-php-devel php74-php-cli php74-php-fpm现在我想安装php-opcache。然而,dnf报告说,似乎没有一个模块php74-php-opcache。
$ sudo dnf install php74-php-opcache
Updating Subscription Management repositories.
Last metadata expiration check: 0:56:51 ago on Fri 04 Jun 2021 13:52:35 NZST.
No match for argument: php74-php-opcache
Error: Unable to find a match: php74-php-opcache我非常确信这与如何设置repos有关,因为在我的dev环境中,它是工作的。
$ sudo dnf -y install php74-php-opcache
Last metadata expiration check: 0:11:18 ago on Fri 04 Jun 2021 02:36:41 PM NZST.
Dependencies resolved.
==================================================================================================================================================================================================================================
Package Architecture Version Repository Size
==================================================================================================================================================================================================================================
Installing:
php74-php-opcache x86_64 7.4.20-1.el8.remi remi-safe 274 k下面是dnf repolist在问题环境上的输出:
$ sudo dnf repolist
Updating Subscription Management repositories.
repo id repo name
epel Extra Packages for Enterprise Linux 8 - x86_64
epel-modular Extra Packages for Enterprise Linux Modular 8 - x86_64
mod-pagespeed mod-pagespeed
pgdg-common PostgreSQL common RPMs for RHEL/CentOS 8 - x86_64
pgdg12 PostgreSQL 12 for RHEL/CentOS 8 - x86_64
remi-modular Remi's Modular repository for Enterprise Linux 8 - x86_64
rhel-8-for-x86_64-appstream-rpms Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
rhel-8-for-x86_64-baseos-rpms Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)作为一个副手,我试过dnf install php-opcache。这个很好。但是它下载了7.2版本,并将opcache.so放在一个不同的位置,在那里PHP正在寻找模块,而不是10-opcache.ini文件。我确实尝试过手动将这些文件复制到PHP安装程序正在查找这些文件的位置,但我收到了警告
/opt/remi/php74/root/usr/lib64/php/modules/opcache.so: undefined symbol: _zval_ptr_dtor发布于 2021-06-04 04:38:58
显然,在粘贴的repolist中,没有启用"remi“存储库。
要获得正确的配置,请遵循向导指令
https://stackoverflow.com/questions/67830994
复制相似问题