镜像下载、域名解析、时间同步请点击阿里云开源镜像站
CentOS8 AnolisOS8 yum安装失败
今天有人反馈服务器卡,登录上服务器,想看下CPU以及内存使用情况,觉得top看不太清晰,想使用htop,发现没有,就想安装一个htop,输入命令,yum安装
yum install htop
意外地,返回了一条错误消息!
[En]
Unexpectedly, an error message was returned!
Repository epel is listed more than once in the configuration
Last metadata expiration check: 0:00:07 ago on Thu 24 Mar 2022 03:54:06 PM CST.
No match for argument: htop
Error: Unable to find a match: htop
百度查过了,有人说要先清空缓存。
[En]
Baidu checked, and some people said to clear the cache first.
yum clean all
执行后复制到服务器,或者不执行,继续到百度寻找解决方案。
[En]
Copy to the server after execution, or not, continue to Baidu to find a solution.
安装失败原因
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.com 和http://mirrors.aliyun.com 也无法同步到CentOS 8的源。当您在阿里云上继续使用默认配置的CentOS 8的源会发生报错。
阿里云官方镜像主页
点击这里找到阿里云的官方镜像网站。
[En]
Find the official mirror website of Aliyun here.
https://developer.aliyun.com/mirror/
找到CentOS,按照里面的操作步骤执行,依然失败!这边就不贴出来了,反正是错误的。
找到下面的评论,有人给出了答案链接,有好几个点赞,点击一下试试
[En]
Find the following comments, someone gave an answer link, there are several likes, click on it to have a try
https://help.aliyun.com/document_detail/405635.html
果然,成功了!
正确的操作步骤
rename '.repo' '.repo.bak' /etc/yum.repos.d/*.repo
wget https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo -O /etc/yum.repos.d/Centos-vault-8.5.2111.repo
wget https://mirrors.aliyun.com/repo/epel-archive-8.repo -O /etc/yum.repos.d/epel-archive-8.repo
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
sed -i 's/mirrors.aliyun.com/mirrors.cloud.aliyuncs.com/g' /etc/yum.repos.d/epel-archive-8.repo
yum clean all && yum makecache
yum install htop
本文转自:https://blog.csdn.net/cyzshenzhen/article/details/123714134
Original: https://www.cnblogs.com/helong-123/p/16117409.html
Author: 萌褚
Title: CentOS8 AnolisOS8 yum安装 No match for argument: htop Error: Unable to find a match: htop
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/523866/
转载文章受原作者版权保护。转载请注明原作者出处!