Centos7系统使用yum遇到的问题failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
简单粗暴重新安装yum。
1、查看linux上所有的yum包
# rpm -qa|grep yum
2、逐个卸载,如
# rpm -e yum-plugin-fastestmirror-1.1.31-34.el7.noarch --nodeps
3、查看自己需要的yum包
# cat /etc/redhat-release 查看系统版本
# file /bin/ls 查看系统位数
4、下载yum依赖,地址http://vault.centos.org
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-3.4.3-158.el7.centos.noarch.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-45.el7.noarch.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-utils-1.1.31-45.el7.noarch.rpm 5、 更新centos系统的repo文件,首先备份一下,免得误操作 /etc/yum.repos.d/CentOS-Base.repo
# cp CentOS-Base.repo CentOS-Base.repo.backup
我的 CentOS-Base.repo 文件中的配置:
# 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-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
再依次运行以下命令生成缓存:
[root@zf-test-web01-4 yum.repos.d]# yum clean all
[root@zf-test-web01-4 yum.repos.d]# yum makecache
完事!
Centos7系统使用yum遇到的问题failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.的更多相关文章
- [linux]Error: failure: repodata/repomd.xml from fedora: [Errno 256] No more mirrors to try.
在使用fedora17 系统的yum源的时候出现了例如以下错误: Error: failure: repodata/repomd.xml from fedora: [Errno 256] No mor ...
- fedora18 [linux]Error: failure: repodata/repomd.xml from fedora: [Errno 256] No more mirrors to try.
在使用fedora17 系统的yum源的时候出现了如下错误: Error: failure: repodata/repomd.xml from fedora: [Errno 256] No more ...
- Error: failure: repodata/repomd.xml from fedora: [Errno 256] No more mirrors to try.
记录一个小问题,重新买的linux换yum源的时候一直提示: Error: failure: repodata/repomd.xml ] No more mirrors to try. 一直说那个XM ...
- docker安装报错failure: repodata/repomd.xml from mirrors.aliyun.com_docker-ce_linux_centos_docker-ce.pro
1.进入 /etc/yum.repos.d 目录下,将所有有关 docker 的 repo 全部删掉 2.重新添加镜像 sudo yum-config-manager --add-repo https ...
- CentOS7系统更换YUM Repo源
CentOS7系统更换YUM Repo源 备份原镜像 sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.re ...
- 使用yum安装报错:[Errno 256] No more mirrors to try
背景:我使用yum方式安装软件时,比如zabbix这种软件,我们在安装时一般都是直接到zabbix官网,按照官方的步骤进行安装,但是有一个问题,官方的服务器不在国内,时常会在安装时导致超时报错.此时解 ...
- yum-config-manager YUM安装遭遇: [Errno 256] No more mirrors to try CentOS yum之$releasever和$basearch
YUM安装遭遇: [Errno 256] No more mirrors to try createrepo 有问题. CentOS yum之$releasever和$basearch分类: 操作系统 ...
- Why does yum return error: [Errno 256] No more mirrors to try ?
https://access.redhat.com/solutions/203603 ISSUE yum update fails with the error : [Errno 256] No mo ...
- 利用yum安装时,报错 [Errno 256] No more mirrors to try.
问题: [root@gg ~]# yum install -y perl-DBD-MySQL Loaded plugins: product-id, refresh-packagekit, secu ...
随机推荐
- 浅议像素化与体素化Part.1——平面图形像素化
什么是像素化 学计算机的人往往都比较清楚图形和图像的区别,而且往往能够从数据结构的角度理解这两者的区别,一般来说,图形是由几何空间中的基本图元所组成,表现为用外部轮廓线条勾勒成的矢量图.例如由计算机绘 ...
- MongoDB应用场景及选型
1. MongoDB数据库定位 * OLTP数据库 * 原则上Oracle和MySQL能做得事情,MongoDB都能做(包括ACID事务) * 优点:横向扩展能力,数据量或并发量增加时候可以自动扩展 ...
- 《手把手教你》系列技巧篇(五十五)-java+ selenium自动化测试-上传文件-下篇(详细教程)
1.简介 在实际工作中,我们进行web自动化的时候,文件上传是很常见的操作,例如上传用户头像,上传身份证信息等.所以宏哥打算按上传文件的分类对其进行一下讲解和分享. 2.为什么selenium没有提供 ...
- window10 查看端口列表 - 查看占用的进程-销毁该进程
cmd进入指令框后 查看端口列表 netstat -ano 查看占用的进程 [6666是端口号对应的进程数] tasklist|findstr "6666" 销毁该进程 [6666 ...
- JUC之读写锁问题
读写锁 读写锁在同一时刻可以允许多个读线程访问,但是在写线程访问时,所有的读线程和其他写线程均被阻塞.读写锁维护了一对锁,一个读锁和一个写锁,通过分离读锁和写锁,使得并发性相比一般的排他锁有了很大提升 ...
- Keil MDK STM32系列(五) 使用STM32CubeMX创建项目基础结构
Keil MDK STM32系列 Keil MDK STM32系列(一) 基于标准外设库SPL的STM32F103开发 Keil MDK STM32系列(二) 基于标准外设库SPL的STM32F401 ...
- P5024 [NOIP2018 提高组] 保卫王国
思路: 首先想到每次询问两个点后就从这两个点开始往上爬,沿路更新 dp 值即可. #include <bits/stdc++.h> #define For(i,a,b) for(int i ...
- JSP页面使用EL表达式不显示实际数据
今天在学习有关jsp的相关知识内容时,遇到了el表达式只是显示括号里面的内容 代码如下: <%@ page contentType="text/html;charset=UTF-8&q ...
- Python 安装MySQL 错误处理
正常情况下如果使用python 连接数据库需要安装 python-MySQL 类库 #pip install python-MySQL 等待安装完成即可 使用时 import MySQLdb ==== ...
- python3 爬取深圳主板公司名称,公司网址
需要阅读的文档: Requests:http://cn.python-requests.org/zh_CN/latest/user/quickstart.html BeautifulSoup:http ...