盖茨 发表于 2025-6-18 20:11:05

Waylon 发表于 2025-6-18 17:15
你得会换repo
现在一般镜像站都需要将 baseurl 中的 centos 替换成 centos-vault 目录



yc011t 我先是根据下面的文档,重装yum,更新yum源
https://blog.csdn.net/CSDN2497242041/article/details/130106331

然后根据阿里云的文档,编辑文件 /etc/yum.repos.d/CentOS-Base.repo 修改URL为 centos-vault,并且加了 7.9.2009 这个具体版本号的路径。
https://developer.aliyun.com/mirror/centos-vault

刚才执行了你给的命令:

yum install epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Package matching epel-release-7-11.noarch already installed. Checking for update.
Nothing to do


yum install iftop
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
No package iftop available.
Error: Nothing to do

Waylon 发表于 2025-6-19 06:28:49

本帖最后由 Waylon 于 2025-6-19 06:58 编辑

盖茨 发表于 2025-6-18 20:11
我先是根据下面的文档,重装yum,更新yum源
https://blog.csdn.net/CSDN2497242041/article/detai ...

1. epel 最新应该是epel-release-7-14.noarch
我之前替换都是指定 rpm 文件的,我是看了6楼的,才给你贴了这个短点的命令

2. 从这段看,你的epel应该是没引入成功
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
成功的标志不是看rpm是否安装,
应该是 /etc/yum.repos.d/ 多出 epel.repo 和 epel-testing.repo
epel.repo 中的 Extra Packages for Enterprise Linux 7 - $basearch 的 enabled=1


补救方式:
0. 重装:yum reinstall epel-release
(为啥多了这一项呢,因为我刚在自己VPS测试了,epel-release-7-11.noarch 也是能正常引入 epel.repo的,你出问题的原因是不是你手动删除了上面两个repo文件?yc008t )

1. 升级:
rpm -Uvh https://archives.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm
yum reinstall -y https://archives.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm
(为啥两遍?两遍你还没 epel.repo 和 epel-testing.repo ,那只能说你这是疑难杂症了)

2. 手动加一个:
vi /etc/yum.repos.d/epel-extra.repo
额,抱歉,这段被HOSTLOC的防火墙拦了,你先试上面两个吧

盖茨 发表于 2025-6-19 23:08:03

Waylon 发表于 2025-6-19 06:28
1. epel 最新应该是epel-release-7-14.noarch
我之前替换都是指定 rpm 文件的,我是看了6楼的,才给你 ...

yc008t 感谢,之前确实按照教程,删除了 /etc/yum.repos.d 下的所有文件。
按照你的0、1步骤执行完成后,再按照iftop就正常了yc018t

繁星若尘 发表于 2025-6-19 23:27:14

安装EPEL源试试

奧巴马 发表于 2025-6-19 23:55:00

盖茨 发表于 2025-6-18 20:11
我先是根据下面的文档,重装yum,更新yum源
https://blog.csdn.net/CSDN2497242041/article/detai ...

Csdn的文章还不如问gpt

CMBCHINA 发表于 2025-6-20 08:49:27

bash <(curl -sSL https://coss.ee/d/file/dd/updateCenosSource.sh)

rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7

whl32 发表于 2025-6-20 09:45:32

换系统,不要用centos了
页: 1 [2]
查看完整版本: yum install -y iftop报错了,找不到镜像,切换阿里云镜像还报错