Centos Can't install php-mcrypt

yum clean all
yum remove epel-release
yum install epel-release 
yum install php-mcrypt

安装完运行yum报错:
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
解决办法:
vi /etc/yum.repos.d/epel.repo
编辑[epel]下的baseurl前的#号去掉,mirrorlist前添加#号

Centos Can't install php-mcrypt_第1张图片
image.png

yum报错:

http://repos.fedorapeople.org/repos/openstack/openstack-icehouse/epel-6/repodata/repomd.xml: 
[Errno 14] problem making ssl connection
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: openstack-icehouse. 
Please verify its path and try again'

解决办法:

先把vi /etc/yum.repos.d/rdo-release.repo里的enabled=0,禁用掉
在执行yum install ca-certificates  #ssl证书
再把enabled=1改回来

你可能感兴趣的:(Centos Can't install php-mcrypt)