user> yum -y install php-mcrypt
Loaded plugins: fastestmirror
PHP52_17 | 2.9 kB 00:00
PHP53_17 | 2.9 kB 00:00
PLESK_17_0_17-extras | 2.9 kB 00:00
PLESK_17_PHP54 | 2.9 kB 00:00
PLESK_17_PHP55 | 2.9 kB 00:00
PLESK_17_PHP56 | 2.9 kB 00:00
PLESK_17_PHP70 | 2.9 kB 00:00
PLESK_17_PHP71 | 2.9 kB 00:00
base | 3.6 kB 00:00
epel/x86_64/metalink | 20 kB 00:00
epel | 4.3 kB 00:00
extras | 3.4 kB 00:00
remi-safe | 2.9 kB 00:00
updates | 3.4 kB 00:00
(1/16): PHP53_17/primary_db | 13 kB 00:00
(2/16): PLESK_17_PHP56/primary_db | 13 kB 00:00
(3/16): PLESK_17_PHP70/primary_db | 13 kB 00:00
(4/16): PLESK_17_PHP71/primary_db | 13 kB 00:00
(5/16): PHP52_17/primary_db | 13 kB 00:00
(6/16): PLESK_17_PHP54/primary_db | 13 kB 00:00
(7/16): PLESK_17_0_17-extras/primary_db | 26 kB 00:00
(8/16): PLESK_17_PHP55/primary_db | 13 kB 00:00
(9/16): base/7/x86_64/group_gz | 155 kB 00:00
(10/16): base/7/x86_64/primary_db | 5.6 MB 00:00
(11/16): epel/x86_64/group_gz | 150 kB 00:00
(12/16): epel/x86_64/updateinfo | 748 kB 00:00
(13/16): extras/7/x86_64/primary_db | 151 kB 00:00
(14/16): epel/x86_64/primary_db | 5.9 MB 00:00
(15/16): remi-safe/primary_db | 725 kB 00:00
(16/16): updates/7/x86_64/primary_db | 5.6 MB 00:00
Determining fastest mirrors
* epel: mirror.nl.leaseweb.net
* remi-safe: remi.mirror.wearetriple.com
Resolving Dependencies
--> Running transaction check
---> Package php-mcrypt.x86_64 0:5.3.3-5.el6 will be installed
--> Processing Dependency: php(zend-abi) = 20090626 for package: php-mcrypt-5.3.3-5.el6.x86_64
--> Processing Dependency: php(api) = 20090626 for package: php-mcrypt-5.3.3-5.el6.x86_64
--> Finished Dependency Resolution
Error: Package: php-mcrypt-5.3.3-5.el6.x86_64 (epel)
Requires: php(zend-abi) = 20090626
Installed: php-common-5.4.16-42.el7.x86_64 (@base)
php(zend-abi) = 20100525-64
Error: Package: php-mcrypt-5.3.3-5.el6.x86_64 (epel)
Requires: php(api) = 20090626
Installed: php-common-5.4.16-42.el7.x86_64 (@base)
php(api) = 20100412-64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
PHP版本:
php -v
PHP 5.4.16 (cli) (built: Nov 6 2016 00:29:02)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader v4.6.0, Copyright (c) 2002-2014, by ionCube Ltd.
的php.ini:
[mcrypt]
; For more information about mcrypt settings see http://php.net/mcrypt-module-open
; Directory where to load mcrypt algorithms
; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt)
;mcrypt.algorithms_dir=
; Directory where to load mcrypt modes
; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt)
;mcrypt.modes_dir=
我也尝试添加php.ini:
extension=/usr/lib64/libmcrypt.so.4.4.8 - error
extension=mcrypt.so - can't load
lib64文件夹中只有两个文件:
libmcrypt.so.4
libmcrypt.so.4.4.8
/ lib64 / php / modules中没有带mcrypt的模块:
curl.so ioncube_loader_lin_5.4.so phar.so
dom.so ioncube_loader_lin_5.5.so remi-release-6.rpm
epel-release-6-8.noarch.rpm json.so sqlite3.so
fileinfo.so mbstring.so sw-engine
gd.so mysqli.so wddx.so
imap.so mysql.so xmlreader.so
ioncube_loader_lin_5.1.so pdo_mysql.so xmlwriter.so
ioncube_loader_lin_5.2.so pdo.so xsl.so
ioncube_loader_lin_5.3.so pdo_sqlite.so zip.so
的解决方案
答案 0 :(得分:1)
这是帮助我的解决方案:
yum clean all
yum remove epel-release
yum install epel-release
yum install php-mcrypt