标签:
解决方法:
1.为系统安装perl-Geo-IP,默认yum源中没有这个包,特意安装epel第三方yum源[root@aminglinux ~] rpm -Uvh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm
?Retrieving http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.BM4bHz: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]
?2.[root@aminglinux ~]#yum install -y libmcrypt-devel
[root@aminglinux ~]#Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again?
解决方法:
1.为系统安装perl-Geo-IP,默认yum源中没有这个包,特意安装epel第三方yum源[root@aminglinux ~] rpm -Uvh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm
?Retrieving http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.BM4bHz: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]
?2.[root@aminglinux ~]#yum install -y libmcrypt-devel
[root@aminglinux ~]#Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again?
这里我们又遇到一个错误,解决方法:
解决办法是编辑/etc/yum.repos.d/epel.repo,把基础的恢复,镜像的地址注释掉
#baseur
lmirrorlist
改成
baseurl
#mirrorlist
步骤如下:(蓝色为需修改的地方)
? [root@aminglinux ~]# vi /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1
?[epel-source]
name=Extra Packages for Enterprise Linux 6 - $basearch - Source
baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1
修改完之后保存退出。?
上面下划线部分错误,是原博主遇到的错误及解决办法。 而我遇到的则是这个错误
Error:Cannot retrieve repository metadata (repomd.xml) for repository: rpmforge. Please verify its path and try again
解决办法是
yum Error: Cannot retrieve repository metadata (repomd.xml) for repository:xxxxxx.
这个错误其实很简单,错误信息已经提示你,就是xxxxxx.repo这个文件有问题。
(1)打开/etc/yum.repos.d/xxxxxx.repo文件
(2)enabled=1(可能有多个,具体改几个,有待测试。 我当时遇到的是第一个需要改。 改了就成功了。)改成enabled=0
3.再次运行?yum install -y libmcrypt-devel
Installed:libmcrypt-devel.i686 0:2.5.8-9.el6 #安装完成
4.?[root@aminglinux src]# cd php-5.3.27
[root@localhost php-5.3.27]# ./configure \ --prefix=/usr/local/php \ --with-apxs2=/usr/sbin/apxs \ --with-config-file-path=/usr/local/php/etc \ --with-mysql=/usr/local/mysql \ --with-libxml-dir \ --with-gd \ --with-jpeg-dir \ --with-png-dir \ --with-freetype-dir \ --with-iconv-dir \ --with-zlib-dir \ --with-bz2 \ --with-openssl \ --with-mcrypt \ --enable-soap \ --enable-gd-native-ttf \ --enable-mbstring \ --enable-sockets \ --enable-exif \ --disable-ipv6
??Thank you for using PHP.
[root@aminglinux php-5.3.27]# echo $?
0
参考:
http://blog.sina.com.cn/s/blog_b5dfe4870102wasu.html#commentComment
http://blog.csdn.net/sissiyinxi/article/details/7595617
感谢俩位博主。
PHP编译安装报错: mcrypt.h not found. Please reinstall libmcrypt.
标签:
原文地址:http://www.cnblogs.com/Cathay/p/5910505.html