在Centos 5.8上安装PHP5.4

时间:2012-09-11 12:19:06

标签: php linux centos

尝试使用http://www.how2centos.com/installing-php-5-4-on-centos-5-8/上的教程从PHP 5.3升级到5.4。我基本上说要做以下事情:

yum install yum-priorities
rpm -Uvh http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1.0-10.ius.el5.noarch.rpm
yum install php54 php54-common php54-devel 

执行第二行时,出现以下错误:

[root@localhost ~]# rpm -Uvh http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
Retrieving http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
error: skipping http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm - transfer failed - Unknown or unexpected error
warning: u 0xc073650 ctrl 0xc074a20 nrefs != 0 (download.fedoraproject.org http)

我做错了什么?感谢

1 个答案:

答案 0 :(得分:3)

那是因为download.fedoraproject.org正在重定向到镜像。 RHEL 5中的RPM不遵循(尚未)。 尝试用直接主机名替换它(例如dl.fedoraproject.org)。