CentOS6的yum报错[Errno 14] PYCURL ERROR 22解决方法

经常搞Linux的人都知道,Linux有很多发行版,比如:Ubuntu、Debian、Fedora、Arch Linux、openSUSE,不同版的软件源的定义方法是不一样的,我们知道,最近CentOS6已经停止更新支持,同时官方也把yum源删除了,目前CentOS 6系统使用yum命令安装软件包基本都是失败,我的执行搜索和安装软件包都是报错:[Errno 14] PYCURL ERROR 22,这是软件源失效的原因,因此需要更换yum源。

默认情况下,yum安装源位置是在/etc/yum.repos.d/这个文件夹下的,其中有多个配置文件,每一个配置文件中都可以配置一个或多个repository, 最终会被合并为一个交给系统。其实,上面的问题,用下面这个源就能解决
1。下载并更新新的yum源:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://file.kangle.odata.cc/repo/Centos-6.repo
wget -O /etc/yum.repos.d/epel.repo http://file.kangle.odata.cc/repo/epel-6.repo
2。重新生成metadata:
yum makecache

posted @ 2021-03-11 15:43  5255号蜘蛛精  阅读(1159)  评论(0编辑  收藏  举报