linux下载插件There are no enabled repos. Run "yum repolist all" to see the repos you have.报错解决

linux下载插件There are no enabled repos. Run “yum repolist all” to see the repos you have.报错解决

转载weixin_43439640 最后发布于2019-05-27 10:59:29 阅读数 977 收藏
展开
CentOS镜像使用帮助

收录架构

i386
x86_64
SRPMS
收录版本

所有版本

更新时间

每4小时更新一次

使用说明

首先备份/etc/yum.repos.d/CentOS-Base.repo

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
1
下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份)

CentOS7
CentOS6
CentOS5
运行以下命令生成缓存

yum clean all
yum makecache
1
2
相关链接
官方主页: http://www.centos.org/
邮件列表: http://www.centos.org/modules/tinycontent/index.php?id=16
论坛: http://www.centos.org/modules/newbb/
文档: http://www.centos.org/docs/
Wiki: http://wiki.centos.org/
镜像列表: http://www.centos.org/modules/tinycontent/index.php?id=32
linux下载插件There are no enabled repos. Run "yum repolist all" to see the repos you have.报错解决
【Redhat7.0】yum makecache报错的解决方法(巨坑!!!)

原创feng_zhiyu 最后发布于2018-05-27 02:54:06 阅读数 8997 收藏
展开
执行时报错:
failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://mirrors.163.com/centos/$releasever/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

本来是想更换yum源,然后就删除了linux中 /etc/yum.repos.d除CentOS-Base.repo文件以外的所有文件
首先,根据http://mirrors.163.com/.help/centos.html指示备份

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
1
然后下载对应版本repo文件, 放入/etc/yum.repos.d/
我下载的是CentOS7
运行以下命令生成缓存

yum clean all
yum makecache

但是执行yum makecache时出现上述错误。

然后在网上搜了一通。 试了n个解决方法,都没有一个对应的。
好几个小时,终于改好了。

就是把下载的CentOS7对应的repo文件中的$releasever全部改成对应版本7,并且把不存在的网址的子路径删去即可。

修改后如下:

CentOS-Base.repo

The mirror system uses the connecting IP address of the client and the

update status of each mirror to pick mirrors that are updated to and

geographically close to the client. You should use this for CentOS updates

unless you are manually picking other mirrors.

If the mirrorlist= does not work for you, as a fall back you can try the

remarked out baseurl= line instead.

[base]
name=CentOS-7 - Base - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=KaTeX parse error: Expected 'EOF', got '&' at position 11: releasever&̲arch=basearch&repo=os
baseurl=http://mirrors.163.com/centos/7/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-7 - Updates - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=KaTeX parse error: Expected 'EOF', got '&' at position 11: releasever&̲arch=basearch&repo=updates
baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-7 - Extras - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=KaTeX parse error: Expected 'EOF', got '&' at position 11: releasever&̲arch=basearch&repo=extras
baseurl=http://mirrors.163.com/centos/7/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-7 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
然后yum makecache生成缓存成功!!!

真的是。。
————————————————
版权声明:本文为****博主「feng_zhiyu」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.****.net/feng_zhiyu/article/details/80466584