yum源安装php报错缺少libmcrypt.so.4()(64bit)库
yum安装php-fpm(自己公司做的rpm包和源)报错,报错信息如下:
--> Finished Dependency Resolution
php-fpm-5.3.10-mjh.1.x86_64 from mjh_repo has depsolving problems
--> Missing Dependency: libmcrypt.so.4()(64bit) is needed by package php-fpm-5.3.10-mjh.1.x86_64 (mjh_repo)
Error: Missing Dependency: libmcrypt.so.4()(64bit) is needed by package php-fpm-5.3.10-mjh.1.x86_64 (mjh_repo)
You could try using --skip-broken to work around the problem
错误提示缺少libmcrypt.so这个库,163和centos源里都没有libmcrypt,libmcrypt-devel两个包,安装php的时候需要这个扩展
下载相应的EPEL源:
(1).32位系统
[root@localhost src]# wget http://mirrors.yun-idc.com/epel/5/i386/epel-release-5-4.noarch.rpm
(2).64位系统
[root@localhost ~]# http://mirrors.hust.edu.cn/epel//5/x86_64/epel-release-5-4.noarch.rpm
安装EPEL源(注:我这里是64位系统)
[root@localhost src]# rpm -ivh epel-release-5-4.noarch.rpm
warning: epel-release-5-4.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]
导入key文件
[root@localhost src]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
解决方法:
EPEL,即Extra Packages for Enterprise Linux(http://fedoraproject.org/wiki/EPEL) 是由 Fedora 社区打造,为 RHEL 及衍生发行版如 CentOS、Scientific Linux 等提供高质量软件包的项目。在这里可以获得 RHEL 的高质量、高性能、高可靠性、免费、方便易用的软件包。
yum install libmcrypt-devel 再次安装yum install php-fpm就不会报错了(使用ldconfig -v |grep libmcrypt.so.4 查看)
本文出自 “linuxsed” 博客,请务必保留此出处http://51network.blog.51cto.com/864602/1434360