CentOS yum安装mcrypt
本篇排错的前提是只想用yum安装,不想使用源码包编译安装。php依赖一下包:#yum install libmcrypt libmcrypt-devel mcrypt mhashSetting up Install PRocessNo package php-mcrypt available.Error: Nothing to do我们会看到centos yum从仓库中根本找不到这几个包。但我不想使用源码编译就想使用yum安装,怎么办?yum install epel-release //扩展包更新包 yum update//更新yum源安装完epel-release,yum update可能会报错如下:Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again解决办法如下:在网上查了查,解决办法是编辑/etc/yum.repos.d/epel.repo,把基础的恢复,镜像的地址注释掉
#baseurlmirrorlist
改成
baseurl#mirrorlist
只改下面这一项就ok了。[epel]name=Extra Packages for Enterprise linux 6 - $basearchbaseurl=http://download.fedoraproject.org/pub/epel/6/$basearch#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearchfailovermethod=priorityenabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6yum install libmcrypt libmcrypt-devel mcrypt mhash 就ok了有人可能想着我换个yum源,不使用官方的,使用阿里云、163,说不定问题就可以解决,这个没用的,我试过了。新闻热点
疑难解答