Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached

yum安装软件出错

    • 1.备份现有repo仓库
    • 2.下载并使用阿里云仓库repo
    • 3.更新yum
    • 4.用yum安装软件

日志信息:Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
No package gcc available.
Error: Nothing to do
出现这个错误一般是没有正确配置镜像文件,或者是用163镜像,由于12 月 8 日,CentOS 开发团队在其官博宣布,CentOS 8 将在 2021 年底结束支持,CentOS 7 由于用户基数与用户贡献较多,因此会按照计划维护至生命周期结束即 2024 年 6 月 30 日,接下来一年会把重心放到 CentOS Stream 上。好多镜像都已经不能访问了

建议以前有镜像的或者是新安装的系统都配置阿里镜像
配置过程如下:

1.备份现有repo仓库

命令:mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2.下载并使用阿里云仓库repo

命令:curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo

3.更新yum

命令1:yum clean all

命令2:yum makecache

4.用yum安装软件

命令: yum -y install 软件名称

说明:1.我使用的是centsos6.7,如果不是6没成功的话需要去官网重新改下步骤2的命令
2.尽量在Linux里面进行安装,Linux连接工具里面安装速度会比较慢

你可能感兴趣的:(linux)