我在哪里可以获得 php-mcrypt for PHP 7?

Where can I get php-mcrypt for PHP 7?

我已将 PHP 升级到 PHP 7,现在看到以下错误 Use of undefined constant MCRYPT_MODE_ECB。我是 运行 CentOS 7 并且在更新 php-mcrypt.

时遇到问题

我在 Arch 上找到了它 Linux 但我不熟悉 Pacman 并且在设置它时遇到了问题。

编辑:这就是我现在的位置。我尝试删除已安装的软件包以安装所需的软件包,但我没有这样的运气。

$ sudo yum install php*
Loaded plugins: fastestmirror
Cannot open: php-7.0.2-1.mga6.src.rpm. Skipping.
Examining php70-php-mcrypt-7.0.0-1.el7.remi.x86_64.rpm: php70-php-mcrypt-7.0.0-1.el7.remi.x86_64
Marking php70-php-mcrypt-7.0.0-1.el7.remi.x86_64.rpm to be installed
Examining php70-php-mcrypt-7.0.0-2.el6.remi.x86_64.rpm: php70-php-mcrypt-7.0.0-2.el6.remi.x86_64
Marking php70-php-mcrypt-7.0.0-2.el6.remi.x86_64.rpm to be installed
Loading mirror speeds from cached hostfile
* base: mirror.cs.pitt.edu
* epel: mirror.symnds.com
* extras: ftp.linux.ncsu.edu
* remi: mirrors.mediatemple.net
* remi-php56: mirrors.mediatemple.net
* remi-safe: mirrors.mediatemple.net
* updates: mirror.atlanticmetro.net
No package php-mcrypt-7.0.2-1-x86_64.pkg.tar.xz available.
Resolving Dependencies
--> Running transaction check
---> Package php70-php-mcrypt.x86_64 0:7.0.0-1.el7.remi will be installed
--> Processing Dependency: php70-php-common(x86-64) = 7.0.0-1.el7.remi for package: php70-php-mcrypt-7.0.0-1.el7.remi.x86_64
---> Package php70-php-mcrypt.x86_64 0:7.0.0-2.el6.remi will be installed
--> Processing Dependency: php70-php-common(x86-64) = 7.0.0-2.el6.remi for package: php70-php-mcrypt-7.0.0-2.el6.remi.x86_64
--> Finished Dependency Resolution
Error: Package: php70-php-mcrypt-7.0.0-1.el7.remi.x86_64 (/php70-php-mcrypt-7.0.0-1.el7.remi.x86_64)
Requires: php70-php-common(x86-64) = 7.0.0-1.el7.remi
Installed: php70-php-common-7.0.2-1.el7.remi.x86_64 (@remi)
php70-php-common(x86-64) = 7.0.2-1.el7.remi
Available: php70-php-common-7.0.1-1.el7.remi.x86_64 (remi)
php70-php-common(x86-64) = 7.0.1-1.el7.remi
Error: Package: php70-php-mcrypt-7.0.0-2.el6.remi.x86_64 (/php70-php-mcrypt-7.0.0-2.el6.remi.x86_64)
Requires: php70-php-common(x86-64) = 7.0.0-2.el6.remi
Installed: php70-php-common-7.0.2-1.el7.remi.x86_64 (@remi)
php70-php-common(x86-64) = 7.0.2-1.el7.remi
Available: php70-php-common-7.0.1-1.el7.remi.x86_64 (remi)
php70-php-common(x86-64) = 7.0.1-1.el7.remi
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
sudo yum install php*

大错特错,有上百个php包,显然不是你想要的。

您应该使用单个 PHP 存储库,并且只安装需要的包(扩展/库)

对于 "remi" 存储库,请参阅向导:http://rpms.remirepo.net/wizard/

因为你有php70-php-common-7.0.2-1.el7.remi.x86_64,你必须使用完全相同的版本,所以php70-php-mcrypt-7.0.2-1.el7.remi.x86_64(在 "remi-safe" 存储库中)。

我希望你已经解决了问题,请找到相同的扩展 link。

# rmp -qa | grep php 
php70w-intl
php70w-soap

# yum install php70w-mcrypt

Link PHP 分机:https://webtatic.com/packages/php70/