Blogger Information
Blog 291
fans 0
comment 0
visits 350750
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
CentOS8 AnolisOS8 yum安装 No match for argument: htop Error: Unable to find a match: htop
Original
1030 people have browsed it

镜像下载、域名解析、时间同步请点击 阿里云开源镜像站

CentOS8 AnolisOS8 yum安装失败

今天有人反馈服务器卡,登录上服务器,想看下CPU以及内存使用情况,觉得top看不太清晰,想使用htop,发现没有,就想安装一个htop,输入命令,yum安装

  1. yum install htop

没想到,返回了错误信息!

  1. Repository epel is listed more than once in the configuration
  2. Last metadata expiration check: 0:00:07 ago on Thu 24 Mar 2022 03:54:06 PM CST.
  3. No match for argument: htop
  4. Error: Unable to find a match: htop

file

百度查了下,有人说要先清空缓存

  1. yum clean all

复制到服务器上执行后,还是一样不行,继续百度找解决方案。

安装失败原因

CentOS 8操作系统版本结束了生命周期(EOL),Linux社区已不再维护该操作系统版本。建议您切换到Anolis或Alinux。如果您的业务过渡期仍需要使用CentOS 8系统中的一些安装包,请根据下文切换CentOS 8的源。

2021年12月31日CentOS 8 EOL。按照社区规则,CentOS 8的源地址
http://mirror.centos.org/centos/8/ 内容已移除,目前第三方的镜像站中均已移除CentOS 8的源。阿里云的源http://mirrors.cloud.aliyuncs.comhttp://mirrors.aliyun.com 也无法同步到CentOS 8的源。当您在阿里云上继续使用默认配置的CentOS 8的源会发生报错。

阿里云官方镜像主页

这边找到阿里云官方镜像网站

https://developer.aliyun.com/mirror/

找到CentOS,按照里面的操作步骤执行,依然失败!这边就不贴出来了,反正是错误的。

后面找到下面评论,有人给出了一个答案链接,有好几个点赞,就点进去试试看

https://help.aliyun.com/document_detail/405635.html

果然,成功了!

正确的操作步骤

  1. rename '.repo' '.repo.bak' /etc/yum.repos.d/*.repo
  1. wget https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo -O /etc/yum.repos.d/Centos-vault-8.5.2111.repo
  1. wget https://mirrors.aliyun.com/repo/epel-archive-8.repo -O /etc/yum.repos.d/epel-archive-8.repo
  1. sed -i 's/mirrors.cloud.aliyuncs.com/url_tmp/g' /etc/yum.repos.d/Centos-vault-8.5.2111.repo && sed -i 's/mirrors.aliyun.com/mirrors.cloud.aliyuncs.com/g' /etc/yum.repos.d/Centos-vault-8.5.2111.repo && sed -i 's/url_tmp/mirrors.aliyun.com/g' /etc/yum.repos.d/Centos-vault-8.5.2111.repo
  1. sed -i 's/mirrors.aliyun.com/mirrors.cloud.aliyuncs.com/g' /etc/yum.repos.d/epel-archive-8.repo
  1. yum clean all && yum makecache
  1. yum install htop

本文转自:https://blog.csdn.net/cyzshenzhen/article/details/123714134

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post