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. ctf之计算器

    题目信息如下: 打开环境,发现是一道简单的计算题 只能输入一位数字 F12查看源码发现作者将最大长度设置为1,我们将最大长度修改了即可 输入答案即可得到flag

  2. webdriver原理及操作

    webdriver原理: 1. WebDriver 启动目标浏览器,并绑定到指定端口.该启动的浏览器实例,做为 webdriver 的 remote server. 2. Client 端通过 Com ...

  3. 你也可以很硬核「GitHub 热点速览 v.22.13」

    本周特推介绍了一个非常易上手,操作难度(主要难度在于机件购买)极低的硬件项目,SmartKnob 让你有个可玩性极高的控制仪.本周特推另外一个项目则是一个安全项目,打破你对 URL 是可靠.安全的认知 ...

  4. 为什么 String 在 Java 中是不可变的?

    我最喜欢的 Java 面试问题,很棘手,但同时也非常有用.一些面试者也常问这个问题,为什么 String 在 Java 中是 final 的.字符串在 Java 中是不可变的,因为 String 对象 ...

  5. jedis 和 redisson 有哪些区别?

    Jedis 和 Redisson 都是Java中对Redis操作的封装.Jedis 只是简单的封装了 Redis 的API库,可以看作是Redis客户端,它的方法和Redis 的命令很类似.Redis ...

  6. List、Set、Map 和 Queue 之间的区别?

    List 是一个有序集合,允许元素重复.它的某些实现可以提供基于下标值的常量 访问时间,但是这不是 List 接口保证的.Set 是一个无序集合.

  7. Eclipse 从SVN检出项目之《文件夹 “” 已不存在 》

    1.eclipse 从svn检出项目 报文件夹不存在, 参考博客 https://blog.csdn.net/wenbsu/article/details/80965680 2.You need to ...

  8. 【SpringBoot学习一】开发入门--快速创建springboot程序

    前言 本片博客记录快速创建springboot工程的两种方式.一种是使用maven创建,一种是使用spring initializr创建.开发环境JDK1.8.IDEA.maven. SpringBo ...

  9. IDEA问题之“微服务启动项目时,不会加载Spring Boot到Services中”

    1.启动项目时,不会加载Spring Boot到Services中 现象解析: 启动项目时 会在debug的位置加载项目 注:这里没有配图,因为问题已解决,未记录图,需往后遇到记录 解决方案: 需要在 ...

  10. 序列化多表操作、请求与响应、视图组件(子类与拓展类)、继承GenericAPIView类重写接口

    今日内容概要 序列化多表操作 请求与相应 视图组件 内容详细 1.序列化多表操作 模型类 models.py中 # 新建django项目 # 创建表 模型类models.py中: from djang ...