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


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

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

学习交流

My Blog

blog.guijianpan.com

技术交流

CentOS8 AnolisOS8 yum安装 No match for argument: htop Error: Unable to find a match: htop的更多相关文章

  1. cloudermanager安装时database connection出现Unexpected error. Unable to verify database connection(图文详解)

    不多说,直接上干货! http://www.aboutyun.com/forum.php?mod=viewthread&tid=20455&extra=&page=2 欢迎大家 ...

  2. CentOS 8 Yum安装ansible

    ansible的安装 直接yum安装ansible会报错,需要先安装epel源. ansible的安装来源于epel仓库,因此在安装前需确保安装了正确的epel源. yum install -y ep ...

  3. yum 安装 依赖报错

    今天使用yum安装的时候 报错: Error: Multilib version problems found. This often means that the root cause 应该是yum ...

  4. centos8平台yum无法安装一些常用软件的解决,如:screen,iftop,nethogs

    一,例如:安装screen时报错: [root@localhost liuhongdi]# yum install screen 上次元数据过期检查:17:39:58 前,执行于 2020年03月18 ...

  5. CentOS8 yum安装Mariadb10.4

    CentOS8 yum安装Mariadb10.4 https://downloads.mariadb.org/mariadb/repositories/#distro=CentOS&distr ...

  6. 完美解决CentOS8 yum安装AppStream报错,更新yum后无法makecache的问题

    问题 CentOS 8 yum安装软件时,提示无法从AppStream下载 [root@C8-3 ~]# yum -y install httpd mariadb-server mariadb php ...

  7. Centos6 yum安装openldap+phpldapadmin+TLS+双主配置

    原文地址:http://54im.com/openldap/centos-6-yum-install-openldap-phpldapadmin-tls-%E5%8F%8C%E4%B8%BB%E9%8 ...

  8. centos使用yum安装软件的时候出现了undefined symbol: CRYPTO_set_locking_callback

    1.问题 在CentOS下使用yum安装软件,结果出现了下面的错误提示: # yum installThere was a problem importing one of the Python mo ...

  9. Linux -- Centos6 yum安装相关问题与处理

    Centos6 yum安装相关问题与处理 由于要使用yum下载文件,突然yum下载不了想要的文件,想更换yum源,结果得重新安装yum 来自本人GitHub地址https://github.com/m ...

随机推荐

  1. CVE-2015-3337(任意文件读取)

    vulhub漏洞环境搭建: https://blog.csdn.net/qq_36374896/article/details/84102101 启动docker环境 cd vulhub-master ...

  2. Kernel Pwn基础教程之 Double Fetch

    一.前言 Double Fetch是一种条件竞争类型的漏洞,其主要形成的原因是由于用户态与内核态之间的数据在进行交互时存在时间差,我们在先前的学习中有了解到内核在从用户态中获取数据时会使用函数copy ...

  3. S120的基本定位功能

    转自:https://support.industry.siemens.com/cs/document/84136148/s120%E7%9A%84%E5%9F%BA%E6%9C%AC%E5%AE%9 ...

  4. ClassNotFoundException: org.springframework.web.context.ContextLoadServlet

    web.xml中配置 <!-- 配置spring核心监听器,默认会以 /WEB-INF/applicationContext.xml作为配置文件 --> <listener> ...

  5. spring-boot-关于module自定义jar包打包无法给其他module使用

    ####世界大坑: 如果仅是使用 <build> <plugins> <plugin> <groupId>org.springframework.boo ...

  6. 遇到MyBatis-Plus的错误之“Table 'mybatis_plus.user' doesn't exist”

    一.问题 Table 'mybatis_plus.user' doesn't exist 二.原因 表中没有user表 三.解决方案 生成user表既可 四.结果图 运行后显示查询出来的数据 五.总结 ...

  7. SVN回滚步骤

  8. python学习笔记(五)——静态方法、类方法、运算符重载

    我们都知道类名是不能够直接调用类方法的.在C++中,把成员方法声明为 static 静态方法后可以通过类名调用.同样的在python中也可以通过定义静态方法的方式让类名直接调用. 静态方法 使用 @s ...

  9. 控制算法的划分(自适应控制、预测控制、模糊控制等,PID等;蚁群算法、神经网络,还有机器学习、人工智能中的很多方法)

    一般来说,控制器的设计,分为控制框架的选取,跟参数的优化.自适应控制.预测控制.模糊控制等,跟PID一样,是控制算法(我习惯称为控制框架). 而粒子群.遗传算法(类似的还有蚁群算法.神经网络,还有机器 ...

  10. expression:_CrtlsValidHeapPointer

    详见stackoverflow "_CrtIsValidHeapPointerUserData means, that you have a heap corruption, which i ...