在 CentOS 6.9 系統下安裝 php 5.6 的過程中,執行如下命令:
yum -y install php56w-pdo php56w-xml php56w-gd php56w-gd.x86_64 php56w-ldap.x86_64 \
php56w-mbstring.x86_64 php56w-mcrypt.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64 php56w-opcache.x86_64
報錯:
Error: Package: php56w-mcrypt-5.6.40-1.w6.x86_64 (webtatic) Requires: libmcrypt.so.4()(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
根據提示:需要 libmcrypt 軟件包
解決辦法:
安裝 epel-release 源即可解決。
yum install epel-release -y
然后執行命令安裝 libmcrypt
yum install libmcrypt libmcrypt-devel -y
