虚拟机centOS6 Linux系统关于yum install mirror报错 路径报错
原因:centOS6在2020年12月停止更新了,然后很多地方包括国内的源地址都失效了,此方法是适用于我的,我也找了很久攻略,因为自己懒,然后没记录下来,不小心删了虚拟机,又耗掉我半天,特写此贴。
操作:修改源 使用vim命令进入到
/etc/yum.repos.d/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. (这行注释的意思就是你mirrolist失效了,可以打开baseurl,但是很可惜 他也失效了 所以改为vault的可以使用)
#
#[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=https://vault.centos.org/6.10/os/$basearch/
#https://vault.centos.org/$releasever/os/$basearch/
gpgcheck=1
gpgkey=https://vault.centos.org/6.10/os/x86_64/RPM-GPG-KEY-CentOS-6
#https://vault.centos.org/centos/RPM-GPG-KEY-CentOS-6#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=https://vault.centos.org/6.10/os/x86_64/
#https://vault.centos.org/$releasever/os/$basearch/
gpgcheck=1
gpgkey=https://vault.centos.org/6.10/os/x86_64/RPM-GPG-KEY-CentOS-6
#https://vault.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=https://vault.centos.org/6.10/extras/$basearch/
#https://vault.centos.org/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=https://vault.centos.org/6.10/os/x86_64/RPM-GPG-KEY-CentOS-6
#https://vault.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=https://vault.centos.org/6.10/contrib/$basearch/
#https://vault.centos.org/$releasever/ccontrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://vault.centos.org/6.10/os/x86_64/RPM-GPG-KEY-CentOS-6
#https://vault.centos.org/centos/RPM-GPG-KEY-CentOS-6#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
baseurl=https://vault.centos.org/6.10/contrib/$basearch/
#https://vault.centos.org/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://vault.centos.org/6.10/os/x86_64/RPM-GPG-KEY-CentOS-6
#https://vault.centos.org/centos/RPM-GPG-KEY-CentOS-6
改完后 按ESC 输入:wq (表示保存并退出) 若你改错了想强制退出不保存 可以输入:q! (也可按u 退回 —>这个不知道是不是通用)
改完后并没有结束,还需要执行以下命令
yum clean all
yum makecache
yum update
(注意 有时候下载失败 有可能不是源失效 可能是你网不好,或者你的虚拟机根本ping不通外网,这种情况只能你自己继续解决相应问题)
虚拟机centOS6 Linux系统关于yum install mirror报错 路径报错相关推荐
- linux系统中make install 时指定安装路径
当我们从github中下载一个开源软件(或者库),通常需要"三连"(./configure && make && make install )安装( ...
- centos6 安装 mantisbt-1.2.8 —— (3)Linux系统下yum源配置(Centos 6)
Linux系统下yum源的配置(阿里云): 1.备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.ba ...
- VMware Fusion for mac虚拟机中Linux系统并使用ssh连接
VMware Fusion for mac虚拟机中Linux系统并使用ssh连接 前言:本篇讲述在Mac操作系统中,使用VMware Fusion虚拟机安装Linux系统 安装VMware Funct ...
- VMware虚拟机的linux系统无法与主机复制粘贴文字以及文件解决办法
VMware虚拟机的linux系统无法与主机复制粘贴文字以及文件解决办法 Ubuntu只需要输入两行代码: sudo apt-get autoremove open-vm-toolssudo apt- ...
- VMwareWorkstation虚拟机安装Linux系统
VMwareWorkstation虚拟机安装Linux系统 目录 虚拟机简介 安装Linux系统 虚拟机简介 虚拟机是一个软件,它可以使你在一台真实PC机器上同时运行二个或更多window / lin ...
- Windows系统安装虚拟机以及Linux系统
一.为什么要安装虚拟机 许多初学者在直接安装Linux时,即使安装成功了,也很有可能不小心破坏掉现有的 Windows 系统,比如导致硬盘数据丢失.Windows 开机异常等等问题. 但是,如果通过虚 ...
- 虚拟机 装服务器系统怎么安装教程,VMware虚拟机安装Linux系统图文教程
VMware虚拟机安装Linux系统图文教程 发布时间:2020-09-16 21:47:53 来源:脚本之家 阅读:115 作者:我是一名程序猿 栏目:服务器 本文为大家分享了VMware安装Lin ...
- VMware虚拟机安装Linux系统手把手菜鸟教程
VMware虚拟机安装Linux系统手把手菜鸟教程 本文引用https://blog.csdn.net/qq_31323797/article/details/84306233,https://blo ...
- 使用虚拟机安装Linux系统常见的错误以及解决方案
使用虚拟机安装Linux系统常见的错误以及解决方案 参考文章: (1)使用虚拟机安装Linux系统常见的错误以及解决方案 (2)https://www.cnblogs.com/yanjiexiansh ...
最新文章
- CVPR 2020 Oral | 旷视研究院提出Circle Loss,革新深度特征学习范式
- rsyslog服务日志报错分析1
- [HNOI2002]彩票
- emwin自定义消息问题
- javascript中动态添加事件
- XGBoost-Python完全调参指南-参数解释篇
- ORACLE初始化参数文件详细文档
- 无人机怎么设定航线_收藏!老飞手的航线规划笔记在这里...(上篇)
- java 蓝桥杯 算法训练 区间k大数查询(题解)
- Hadoop:Hadoop基本命令
- Spring设置定时器配置
- MySQL中的基本SQL语句
- table-首列冻结
- 孤军大作战!疯狂DIY 1U硬件防火墙实录(转)
- Firefox与chrome 远程调试标签页初体验,顺便解决PC移动端网页因为safe-browsing表现不一致问题。
- hansontable编辑器
- 程序员必备的5个自媒体工具
- 设计模式学习笔记总结
- NPDP新产品考试考后感想~
- 黄金的18K和24K是什么意思