在CentOS 6.3上安装PHP 5.4.11

前端之家收集整理的这篇文章主要介绍了在CentOS 6.3上安装PHP 5.4.11前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我的CentOs 6.3服务器上有 PHP 5.3.3,因为这个版本的 PHP现在很容易升级PHP 5.4.11,但CentOs的默认存储库没有PHP> 5.3.3因此yum无法检测到更新的版本.

然后我在我的服务器上安装了remi存储库

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

这些命令已成功安装存储库

现在升级PHP的命令

yum --enablerepo=remi,remi-test update httpd MysqL MysqL-server PHP PHP-common

但它失败,出现以下错误消息

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Error: Cannot retrieve Metalink for repository: epel. Please verify its path and try again

如果我尝试yum info PHP相同的错误消息

基本上在安装这些存储库之后,yum不起作用,但是yum工作得更早了.

如果我删除这些存储库并尝试yum它没有任何错误.

如何将PHP升级PHP 5.4.11版本?

编辑
正如@Michael建议我跑了

yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base epel extras updates
Cleaning up Everything
Cleaning up list of fastest mirrors
`[root@www ~]# yum --obsoletes update
Loaded plugins: fastestmirror
Determining fastest mirrors
Error: Cannot retrieve Metalink for repository: epel. Please verify its path and try again

还是一样的错误

编辑2

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

互联网连接运行良好,我查了一下

wget http://google.com

编辑3

正如@Michael建议我跑了

URLGRABBER_DEBUG = 1 yum check-update
它最终出现以下错误

Problem with the SSL CA cert (path? access rights?)
2013-02-24 20:31:45,730 exception: [Errno 14] PYCURL ERROR 77 - "Problem with the SSL CA cert (path? access rights?)"
INFO:urlgrabber:exception: [Errno 14] PYCURL ERROR 77 - "Problem with the SSL CA cert (path? access rights?)"
2013-02-24 20:31:46,051 retrycode (14) not in list [-1,2,4,5,6,7],re-raising
INFO:urlgrabber:retrycode (14) not in list [-1,re-raising
Error: Cannot retrieve Metalink for repository: epel. Please verify its path and try again

因此,实际问题是SSL证书,但为什么它抱怨SSL证书,但它是有效的

添加新存储库后,请在尝试安装更多软件包之前清除yum缓存并更新系统.
yum clean all
yum --obsoletes update

根据您的更新信息,您的本地CA证书已损坏或删除.尝试重新安装它们:

yum reinstall ca-certificates

猜你在找的CentOS相关文章