全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 562|回复: 16

yum install -y iftop报错了,找不到镜像,切换阿里云镜像还报错

[复制链接]
发表于 2025-6-18 15:39:24 | 显示全部楼层 |阅读模式
根据阿里云的教程,切换的CentOS 7的镜像。
https://developer.aliyun.com/mirror/centos


切换之后,执行验证:
sudo yum repolist

里面好多都改成阿里云的镜像里,唯独出现一个报错:
http://mirrors.ustc.edu.cn/epel/7/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found



该怎么搞呢?
发表于 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文件? )

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-18 15:59:32 | 显示全部楼层
自己换源:bash <(curl -sSL https://linuxmirrors.cn/main.sh)
发表于 2025-6-18 15:40:37 | 显示全部楼层
太老了,估计都归档处理,自己换源
 楼主| 发表于 2025-6-18 15:41:44 | 显示全部楼层
笑花落半世琉璃 发表于 2025-6-18 15:40
太老了,估计都归档处理,自己换源

已经按阿里云的教程,切换过去了
发表于 2025-6-18 16:07:56 | 显示全部楼层
切成官方源,一般不会有问题
发表于 2025-6-18 16:41:21 | 显示全部楼层
 楼主| 发表于 2025-6-18 17:00:40 | 显示全部楼层

玩不动了,我最后自己去下单iftop,然后make
发表于 2025-6-18 17:15:14 | 显示全部楼层
本帖最后由 Waylon 于 2025-6-18 18:20 编辑

你得会换repo
现在一般镜像站都需要将 baseurl 中的 centos 替换成 centos-vault 目录


iftop其实不在CentOS官方库,而是在这个库:
yum install epel-release


还有,要学会找 rpm ,没必要上来就编译

https://archives.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/i/
https://archives.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/i/iftop-1.0-0.21.pre4.el7.x86_64.rpm

https://rpmfind.net/linux/rpm2html/search.php?query=iftop&submit=Search+...&system=&arch=
https://rpmfind.net/linux/dag/redhat/el7/en/x86_64/dag/RPMS/iftop-1.0-0.pre3.el7.rf.x86_64.rpm

发表于 2025-6-18 17:22:09 | 显示全部楼层
没有源了,只有centos-vault源可以用了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-9-7 20:41 , Processed in 0.064285 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表