怎样解决当yum安装软件时 “Package is not signed”的提示

2014年12月17日 | 分类: 【技术】

有时用yum install xxx.rpm时会提示”Package xxx.rpm is not signed”而使安装中断,有两种解决方法:

1. 加上–nogpgcheck选项

比如:

yum --nogpgcheck install PackageName1.1.1.rpm

或者:

yum --nogpgcheck install PackageName

例如:

使用yum安装Perl时报错:

...
Package perl-File-Remove-0.38-1.el5.art.noarch.rpm is not signed

尝试上面方法:

yum --nogpgcheck install perl-File-Remove
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * atomic: mirrors.hosting.in.th
 * base: mirrors.skyshe.cn
 * extras: mirrors.skyshe.cn
 * updates: mirrors.pubyun.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-File-Remove.noarch 0:0.38-1.el5.art set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package           Arch           Version           Repository           Size
================================================================================
Installing:
 perl-File-Remove  noarch         0.38-1.el5.art    atomic               20 k

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total size: 20 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : perl-File-emove     1/1

Installed:
  perl-File-Remove.noarch 0:0.38-1.el5.art

Complete!

2. 修改/etc/yum.conf

vim /etc/yum.conf

将gpgcheck=1改为gpgcheck=0。