Error: Cannot find a valid baseurl for repo: base

 

Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
http://mirrors.aliyun.com/centos/7/os/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.

Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. 

【原因】yum源找不到了,url: http://mirrors.aliyun.com/centos/7/os/i386 404

【解决办法】

更换可用路径就好了。

https://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml

#修改CentOS-Base.repo中的baseurl
#/etc/yum.repos.d/CentOS-Base.repo
vi CentOS-Base.repo 
#全局修改:命令模式下
%s/i386/x86_64/g
#清除并且生成缓存
yum clean all
yum makecache

【追加】

yum clean all时出现的问题

Another app is currently holding the yum lock; waiting for it to exit...
#kill该app pid即可
kill -9 2622

 

上一篇:scala特质继承类


下一篇:Skywalking告警功能