我正在尝试安装 mcrypt
yum install php-mcrypt
但遇到这个依赖错误:
Error: Package: php-mcrypt-5.4.16-9.el7.x86_64 (epel)
Requires: php(api) = 20100412-64
installed: php-common-7.4.30-1.amzn2.x86_64 (@amzn2extra-php7.4)
php(api) = 20190902-64
到目前为止我已经尝试过
- yum 更新
- 重新安装 epel
- 安装 libmcrypt-devel
显然,我似乎对某些事情的理解有误,但我不确定php(api) = 20100412-64
答案1
设法使用以下命令解决此问题:
dnf install -y epel-release
yum install --enablerepo=epel -y gcc libmcrypt-devel make
pecl install mcrypt-1.0.3
echo 'extension=mcrypt.so' > /etc/php.d/20-mcrypt.ini
systemctl restart php-fpm.service
systemctl restart httpd.service