avatar

命令行小屋

A text-focused Halo theme

  • Ai
  • Linux
  • 游戏
  • 数据库
  • Apache Hadoop
  • Windows
  • 手机
主页 Centos换yum源
文章

Centos换yum源

发表于 2019-02-11 更新于 2025-02- 11
作者 KennethCheng
5~6 分钟 阅读

yum报错

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"

查看版本号

cat /etc/issue
cat /etc/redhat-release

修改源

cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak #备份
vi /etc/yum.repos.d/CentOS-Base.repo

修改成vault.centos.org

[base]
name=CentOS-$releasever - Base
baseurl=http://vault.centos.org/7.7.1908/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 
[updates]
name=CentOS-$releasever - Updates
baseurl=http://vault.centos.org/7.7.1908/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 
[extras]
name=CentOS-$releasever - Extras
baseurl=http://vault.centos.org/7.7.1908/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

清空缓存生成缓存

yum clean all && yum makecache
CentOS
许可协议:  CC BY 4.0
分享

相关文章

5月 11, 2019

Centos部署frp

下载frp 下载链接 做成服务 vi /lib/systemd/system/frpc.service 配置内容

2月 11, 2019

Centos换yum源

yum报错 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&a

下一篇

Centos部署frp

上一篇

激活Windows

最近更新

  • New API vs LiteLLM:大模型 API 网关终极对决,6 维对比一篇说透
  • 3 分钟把 100 个大模型塞进一个 API:用 LiteLLM 给公司搭一层 LLM 网关
  • ComfyUI 修复 SageAttention 报错指南:解决 MiniMax H3 Memory Efficient Sage Attention Patch 安装失败问题
  • 零代码造 Agent 的时代来了:LangSmith Fleet 完全上手指南
  • 别让你的 AI Agent 裸奔:Sandbox 沙箱隔离从入门到选型

热门标签

samsung WireGuard Chevereto docker 破解 llama MiniMax-H3 ComfyUI LangChain Ai

目录

©2026 命令行小屋. 保留部分权利。

使用 Halo 主题 Chirpy