dnf和rpm和yum关系_Rpm,Yum,Dnf“ NOKEY”公钥检查错误和解决方案

RPM和YUM是Linux系统中用于软件包管理的工具,它们使用GPG签名确保软件包的安全性。当遇到NOKEY错误时,通常是由于缺少验证软件包的公钥。可以通过运行特定命令获取缺失的公钥,或者临时禁用GPG签名检查以继续安装。对于yum和dnf,可以使用--nogpgcheck选项禁用单次或全局的签名检查。这有助于在无法验证公钥的情况下安装软件包。
摘要由CSDN通过智能技术生成
dnf和rpm和yum关系

dnf和rpm和yum关系

Rpm is very popular and secure package management format and application. Recent version of the rpm and yum command uses Public Key Check in order to make installation more secure. This is done by checking integrity of the rpm package.

Rpm是非常流行且安全的软件包管理格式和应用程序。 rpmyum命令的最新版本使用公共密钥检查以使安装更加安全。 这是通过检查rpm软件包的完整性来完成的。

RPM软件包的NOKEY错误 (NOKEY Error For RPM Package)

We may see the error during a package installation with rpm or yum command.The main reason for this error is digital signature key not verified. Also the error has NOKEY message which can be seen below. There are different reasons for this NOKEY error for RPM packages. Solutions are explained below for these different error cases.

在使用rpmyum命令安装软件包时,我们可能会看到该错误。此错误的主要原因是未验证数字签名密钥。 该错误还有NOKEY消息,如下所示。 对于RPM软件包,此NOKEY错误有不同的原因。 下面介绍了针对这些不同错误情况的解决方案。

NOKEY Error
NOKEY Error
NOKEY错误

显示包裹签名(Show Package Signature)

If we want to get more details about the signature of the package we can use -q -i options for rpm command. In this example, we will check the signature and public key of the oracle package.

如果要获取有关软件包签名的更多详细信息,可以对rpm命令使用-q -i选项。 在此示例中,我们将检查oracle包的签名和公钥。

$ sudo rpm -qi oracle-database-xe-18c-1.0-1.x86_64.rpm
Show Signature
Show Signature
显示签名

We can see that there is a warning which will print the public key error. We can see that Signature line show information about the hash algorithm, date and time and Key ID.

我们可以看到有一个警告会打印出公钥错误。 我们可以看到, Signature行显示了有关哈希算法,日期和时间以及密钥ID的信息。

禁用RPG软件包的GPG签名检查 (Disable GPG Signature Check For The RPM Package)

We will use  --nosignature in order to prevent GPG or signature check of given rpm package.

我们将使用--nosignature来防止GPG或给定rpm软件包的签名检查。

$ sudo rpm --nosignature oracle-database-xe-18c.rpm

禁用Yum / Dnf的GPG签名检查 (Disable GPG Signature Check For Yum/Dnf)

We can use yum or dnf command by providing --nogpgcheck option to the command. This will disable Public key or signature check for the current command. But signature check will not disabled in general.

通过为命令提供--nogpgcheck选项,可以使用yumdnf命令。 这将禁用当前命令的公钥或签名检查。 但是通常不会禁用签名检查。

$ yum install --nogpgcheck oracle-database.rpm

全局禁用Yum / Dnf的GPG签名检查 (Disable GPG Signature Check For Yum/Dnf Globally)

Yum is a very useful package manager which can resolve dependencies of the rpm packages and download from the network. We can set gpgcheck configuration in /etc/yum.conf . This will disable signature check for all yum or dnf commands.

Yum是一个非常有用的软件包管理器,可以解决rpm软件包的依赖性并从网络下载。 我们可以在/etc/yum.conf设置gpgcheck配置。 这将禁用所有yumdnf命令的签名检查。

gpgcheck=0
LEARN MORE  What Is APT (Advanced Package Tool) For Linux?
了解更多信息什么是Linux的APT(高级软件包工具)?

翻译自: https://www.poftut.com/rpm-yum-dnf-nokey-public-key-check-error-and-solution/

dnf和rpm和yum关系

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值