yum -y install vim
执行上述命令时报错,yum源用的iso本机挂载
Install 1 Package (+30 Dependent packages)
Total size: 18 M
Installed size: 60 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/base/packages/perl-HTTP-Tiny-0.033-3.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KE-CentOS-7
GPG key retrieval failed: [Errno 14] curl#37 - “Couldn’t open file /etc/pki/rpm-gpg/RPM-GPG-KE-CentOS-7”
网上搜索尝试了很多办法,更新密匙,修改文件,都没有效果,实际能用是是下面的方法。
解决方案是:rpm --import /etc/pki/rpm-gpg/RPM*