zl程序教程

您现在的位置是:首页 >  其它

当前栏目

本地yum源无法使用 ,报错:rpm --import public.gpg.key

报错 -- 无法 本地 Key yum import RPM
2023-09-14 09:02:05 时间

无法使用本地源安装,错误信息如下:

Loaded plugins: fastestmirror

You have enabled checking of packages via GPG keys. This is a good thing. 
However, you do not have any GPG public keys installed. You need to download
the keys for packages you wish to install and install them.
You can do that by running the command:
    rpm --import public.gpg.key


Alternatively you can specify the url to the key you would like to use
for a repository in the 'gpgkey' option in a repository section and yum 
will install it for you.

For more information contact your distribution or package provider.

Problem repository: centos7

解决方法1:

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
yum clean all
yum makecache 

解决方法2:

在repo配置中加入

gpgcheck=0

在这里插入图片描述