Redhat8/CentOS8配置网络源,Failed to synchronize cache for repo ‘LocalRepo_AppStream‘, ignoring this repo.

问题

在Redhat8中yum安装gtk发生错误。

[root@localhost ~]# yum install gtk2-devel.x86_64
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
LocalReeepository_AppStream 0.0 B/s | 0 B 00:00
LocalReeepository_BaseOS 0.0 B/s | 0 B 00:00
Failed to synchronize cache for repo ‘LocalRepo_AppStream’, ignoring this repo.
Failed to synchronize cache for repo ‘LocalRepo_BaseOS’, ignoring this repo.
No match for argument: gtk2-devel.x86_64
Error: Unable to find a match

之前配置源的时候没有本地镜像,所以源失效了。
从网上找了教程改成阿里云的镜像,也没有效果。Redhat8/CentOS8配置网络源,Failed to synchronize cache for repo ‘LocalRepo_AppStream‘, ignoring this repo._第1张图片

解决方法

直接下载阿里云镜像站的 CentOS 8 网络源

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo

并把之前的失效源归档

mv /etc/yum.repos.d/local.repo /etc/yum.repos.d/local.repo.bak

确保/etc/yum.repos.d目录下只有 Centos-8.repo 一个后缀为repo的文件,其它的全部增加后缀.bak。

测试

查询库并安装gtk

yum list
yum install gtk2.x86_64

Redhat8/CentOS8配置网络源,Failed to synchronize cache for repo ‘LocalRepo_AppStream‘, ignoring this repo._第2张图片
安装QQ for Linux

rpm -ivh linuxqq_1.0.1-b1-100_mips64el.rpm

Redhat8/CentOS8配置网络源,Failed to synchronize cache for repo ‘LocalRepo_AppStream‘, ignoring this repo._第3张图片
测试完成
Redhat8/CentOS8配置网络源,Failed to synchronize cache for repo ‘LocalRepo_AppStream‘, ignoring this repo._第4张图片

你可能感兴趣的:(Linux,linux,yum,redhat,centos,阿里云)