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/6/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/6/os/i386 404

【解决办法】

更换可用路径就好了。

改为如下url

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

Please keep in mind that 6.0, 6.1, 6.2, 6.3, 6.4 and 6.5 no longer gets any updates, nor
any security fix's.
注意的一点是,阿里云镜像站已经不再提供6.x的内容和任何更新了。
#修改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

 

posted @ 2022-02-28 15:18  无论怎样new个对象  阅读(220)  评论(0)    收藏  举报