CentOS8 AnolisOS8 yum安裝 No match for argument: htop Error: Unable to find a match: htop


鏡像下載、域名解析、時間同步請點擊 阿里雲開源鏡像站

CentOS8 AnolisOS8 yum安裝失敗

今天有人反饋服務器卡,登錄上服務器,想看下CPU以及內存使用情況,覺得top看不太清晰,想使用htop,發現沒有,就想安裝一個htop,輸入命令,yum安裝

yum install htop

沒想到,返回了錯誤信息!

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

file

百度查了下,有人說要先清空緩存

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.com 和http://mirrors.aliyun.com 也無法同步到CentOS 8的源。當您在阿里雲上繼續使用默認配置的CentOS 8的源會發生報錯。

阿里雲官方鏡像主頁

這邊找到阿里雲官方鏡像網站

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

找到CentOS,按照里面的操作步驟執行,依然失敗!這邊就不貼出來了,反正是錯誤的。

后面找到下面評論,有人給出了一個答案鏈接,有好幾個點贊,就點進去試試看

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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM