我在我的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版本?
编辑为@迈克尔build议我跑了
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
正如@迈克尔build议我跑了
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, 2, 4, 5, 6, 7], re-raising Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
所以,实际的问题是SSL证书,但为什么它抱怨SSL证书,但它是有效的
添加新的存储库后,清除你的yumcaching并更新你的系统,然后再尝试安装更多的包。
yum clean all yum --obsoletes update
根据您的更新信息,看起来您的本地CA证书已被损坏或删除。 尝试重新安装它们:
yum reinstall ca-certificates
vi epel.repo
改变了https
mirrorlist = https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch= $ basearch to mirrorlist = http://mirrors.fedoraproject.org/metalink?repo=epel-6&arch= $ basearch
成功了!
解决scheme来更新旧版本:
rpm -e epel-release yum clean all yum -y --obsoletes update --skip-broken yum reinstall ca-certificates yum -y update --skip-broken yum -y install epel-release