redhat7.2 error: public.gpg.key: import read failed(2).

系统版本:

[[email protected] yum.repos.d]# cat /etc/redhat-release

Red Hat Enterprise Linux Server release 7.2 (Maipo)

最初本地yum文件:

[[email protected] yum.repos.d]# cat local.repo

[loacl]

name=local

baseurl=file:///media/cdrom

enabled=1

gpgchek=0

之后本地yum源安装软件,出现以下报错:

[[email protected] yum.repos.d]# yum install elinks*

Loaded plugins: langpacks, product-id, search-disabled-repos

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: loacl

之后输入提示命令出现如下报错:

[[email protected] yum.repos.d]# rpm --import public.gpg.key

error: public.gpg.key: import read failed(2).

将gpgkey路径加入到编辑local.repo文件:

[[email protected] yum.repos.d]# cat local.repo

[loacl]

name=local

baseurl=file:///media/cdrom

enabled=1

gpgchek=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

执行yum list之后安装成功:

[[email protected] yum.repos.d]# yum install elinks*

Loaded plugins: langpacks, product-id, search-disabled-repos

loacl                                                                                                                                                                 | 4.1 kB  00:00:00

Resolving Dependencies

--> Running transaction check

---> Package elinks.x86_64 0:0.12-0.36.pre6.el7 will be installed

--> Processing Dependency: libmozjs185.so.1.0()(64bit) for package: elinks-0.12-0.36.pre6.el7.x86_64

--> Processing Dependency: libnss_compat_ossl.so.0()(64bit) for package: elinks-0.12-0.36.pre6.el7.x86_64

--> Running transaction check

---> Package js.x86_64 1:1.8.5-19.el7 will be installed

---> Package nss_compat_ossl.x86_64 0:0.9.6-8.el7 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

………………………………

方法百度所得,参考链接:http://www.bubuko.com/infodetail-1639901.html

时间: 2024-12-22 08:26:44

redhat7.2 error: public.gpg.key: import read failed(2).的相关文章

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

一次重装CentOS7系统后,挂载光驱并制作成本地yum源却无法使用yum进行安装,这TM着实有点闹心.o(>﹏<)o 案发现场: [[email protected] ~]# yum -y install /mnt/Packages/vsftpd-3.0.2-22.el7.x86_64.rpm You have enabled checking of packages via GPG keys. This is a good thing.However, you do not have an

您尚未安装任何 GPG 公钥:出现rpm --import public.gpg.key,解决办法

解决办法:[[email protected] ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 然后再yum install httpd就ok了 原文地址:http://blog.51cto.com/13581826/2115224

REHL7中yum 安装提示 GPG.KEY问题

yum install -y httpd 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 downloadthe keys for packages you wish to install and install them.You can do that by ru

rpm的gpg key

1 gpg 这是一种公钥.私钥机制. 2 rpm包的格式 rpm包由四部分构成,lead.signature.header和archive构成. 这里的签名(signature)是加密了的,也就是说,rpm包的发布者事先用gpg的私钥加密了.这个signature是md5. 3 rpm包的gpg key机制即数字签名 目的就是为了防止别人更改了我发布的rpm包. 看rpm包是否被修改的方法.第一,得到发布的包的md5,用公钥解密出原有的md5.第二,计算出我获取的rpm包的md5. 如果两者相同

GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-

今天更新为163的源后,yum的时候报错:GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5. 解决方案:vi /etc/yum.repos.d/CentOS-Base.repo 把文件里所有的RPM-GPG-KEY-CentOS-5更改为RPM-GPG-KEY-CentOS-6就可以了 vim 替换 :%s/RPM-GPG-KEY-CentOS

GPG key retrieval failed: [Errno 14] curl#37 - &quot;Couldn&#39;t open file /etc/pki/rpm-gpg/RPM-GPG-KEY-Cent

错误描述:cento更新完源之后安装软件会出现这个错误 GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6" 解决方法:修改/etc/yum.repos.d/CentOS-Base.repo 最后面的数字改成版本号,例如我用的是centos7,那就所有的gpgkey的最后一个数字都改成7 gpgkey=file:///etc/pk

装完jdk运行java出现错误Error opening registry key &#39;Software\JavaSoft\Java Runtime Environment&#39;

装完jdk运行java出现错误Error opening registry key 'Software\JavaSoft\Java Runtime Environment' 出现上述错误的终极解决办法是jdk安装路径里面不能含有中文...... 装完jdk运行java出现错误Error opening registry key 'Software\JavaSoft\Java Runtime Environment'

安装jdk出现问题:Error opening registry key&#39;software\Javasoft\Java Runti

重装系统后发现jdk没有了,重新安装了,装一个其实挺容易的,但是“java -version”回车的时候,“啪”,error: Error opening registry key'software\Javasoft\Java Runtime Environment'Error: could not find java.dllError: could not find Java 2 Runtime Environment' 怎么会这样子,于是度娘~找到了好几种解决方法,但是每人的电脑不同,方法不

&quot;Error opening registry key &#39;Software\JavaSoft\Java Runtime Environment&quot;解决方案

这里的解决方案是针对windows操作系统. 解决方案步骤: 1.首先进入注册表,运行----->regedit----->HKEY_LOCAL_MACHINE----->SOFTWARE----->JavaSoft ----->Java Development Kit目录下可能有两个文件夹,如果有两个,将不是你刚刚安装的给删除掉: 2.打开"我的电脑",在地址栏中输入----->%SystemRoot%\system32----->找到jav