yum install -y iftop报错了,找不到镜像,切换阿里云镜像还报错
yc014t 根据阿里云的教程,切换的CentOS 7的镜像。https://developer.aliyun.com/mirror/centos
切换之后,执行验证:
sudo yum repolist
里面好多都改成阿里云的镜像里,唯独出现一个报错:
http://mirrors.ustc.edu.cn/epel/7/x86_64/repodata/repomd.xml: HTTP Error 404 - Not Found
https://free.boltp.com/2025/06/18/68526d0ebb5a0.webp
该怎么搞呢?yc014t 本帖最后由 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的防火墙拦了,你先试上面两个吧
自己换源:bash <(curl -sSL https://linuxmirrors.cn/main.sh) 太老了,估计都归档处理,自己换源 笑花落半世琉璃 发表于 2025-6-18 15:40
太老了,估计都归档处理,自己换源
yc002t 已经按阿里云的教程,切换过去了 切成官方源,一般不会有问题 https://kvm.la/1745.html 换ubuntu
Kvm 发表于 2025-6-18 16:41
yc010t 玩不动了,我最后自己去下单iftop,然后make 本帖最后由 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
没有源了,只有centos-vault源可以用了
页:
[1]
2
