1. 程式人生 > >Centos7 更新yum報錯http://nginx.org/packages/centos/$releaserver/x86_64/repodata/repomd.xml: [Errno 14]

Centos7 更新yum報錯http://nginx.org/packages/centos/$releaserver/x86_64/repodata/repomd.xml: [Errno 14]

新安裝好的centos7,下載新的yum源,在yum update和yum makecache 時報錯如下:

修改nginx.repo

vim /etc/yum.repos.d/nginx.repo

[nginx]

name=nginx repo
baseurl=http://nginx.org/packages/centos/$releaserver/x86_64/
gpgcheck=0
enabled=1

修改為

[nginx]

name=nginx repo
baseurl=http://nginx.org/packages/centos/7/x86_64/     #7為當前centos的版本號
gpgcheck=0
enabled=1