Centos6.6 install sysstat error /etc/cron.d

In order to use sar and iostat monitoring tools, you need to install sysstat package, but encountered an error

1. Installation with yum

[root@leader Packages]# yum install -y sysstat*
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Examining sysstat-9.0.4-27.el6.x86_64.rpm: sysstat-9.0.4-27.el6.x86_64
Marking sysstat-9.0.4-27.el6.x86_64.rpm to be installed
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package sysstat.x86_64 0:9.0.4-27.el6 will be installed
--> Processing Dependency: /etc/cron.d for package: sysstat-9.0.4-27.el6.x86_64
--> Processing Dependency: /etc/cron.d for package: sysstat-9.0.4-27.el6.x86_64
--> Finished Dependency Resolution
Error: Package: sysstat-9.0.4-27.el6.x86_64 (/sysstat-9.0.4-27.el6.x86_64)
Requires: /etc/cron.d
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

2. Install with rpm

[root@leader Packages]# rpm -ivh sysstat*
warning: sysstat-9.0.4-27.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
/etc/cron.d is needed by sysstat-9.0.4-27.el6.x86_64

the reason:

This is due to yum initial installation of the old version of the GPG keys installed caused

Solution:

(Introduction of installed public key)

[root@leader Packages]# rpm --import /etc/pki/rpm-gpg/RPM*

Rpm installation package again, followed by such --force --nodeps

[root@leader Packages]# rpm -ivh sysstat* --force --nodeps
Preparing... ########################################### [100%]
1:sysstat ########################################### [100%]

 

Guess you like

Origin www.cnblogs.com/guipeng/p/12104831.html