[Solved] Error in installing RPM package in CentOS – no key

Because this machine is newly installed centos7 , NC – netcat is not installed by default, so an RPM package is downloaded. The installation error is as follows:

[cos@localhost Desktop]$ ls
[cos@localhost Desktop]$ rpm -ivh netcat-0.7.1-1.i386.rpm 
Warning: netcat-0.7.1-1.i386.rpm: Header V3 DSA/SHA1 Signature, key ID b2d79fc1: NOKEY
Error: Dependency detection failed.
    libc.so.6 required by netcat-0.7.1-1.i386
    libc.so.6(GLIBC_2.0) is required by netcat-0.7.1-1.i386
    libc.so.6(GLIBC_2.1) required by netcat-0.7.1-1.i386
    libc.so.6(GLIBC_2.3) required by netcat-0.7.1-1.i386

The GPG key of CentOS was originally required

To   http://centos.ustc.edu.cn/centos/7/os/x86_64 /, download and import the corresponding GPG key to solve the problem( This machine is rpm-gpg-key-centos-7)

Then import with GPG command:

[cos@localhost Desktop]$ gpg --quiet --with-fingerprint ./RPM-GPG-KEY-CentOS-7 
gpg: A new configuration file '/home/cos/.gnupg/gpg.conf' has been created
gpg: Warning: The options in '/home/cos/.gnupg/gpg.conf' were not used during this run
pub  4096R/F4A80EB5 2014-06-23 CentOS-7 Key (CentOS 7 Official Signing Key) <[email protected]>
Key Fingerprint = 6341 AB27 53D7 8A78 A7C2  7BB1 24C6 A8A7 F4A8 0EB5


Import the RPM package of netcat again to succeed:

[cos@localhost Desktop]$ rpm netcat-0.7.1-1.i386.rpm 
RPM Version 4.11.1
Copyright (C) 1998-2002 - Red Hat, Inc.
This program may be freely distributed under the terms of the GNU GPL

Usage: rpm [-aKfgpqVcdLilsiv?] [-a|--all] [-f|--file] [-g|--group]
        [-p|--package] [--pkgid] [--hdrid] [--triggeredby] [--whatrequires]
        [--whatprovides] [--nomanifest] [-c|--configfiles] [-d|--docfiles]
        [-L|--licensefiles] [--dump] [-l|--list] [--queryformat=QUERYFORMAT]
        [-s|--state] [--nofiledigest] [--nofiles] [--nodeps] [--noscript]
        [--allfiles] [--allmatches] [--badreloc] [-e|--erase <package>+]
        [--excludedocs] [--excludepath=<path>] [--force]
        [-F|--freshen <packagefile>+] [-h|--hash] [--ignorearch] [--ignoreos]
        [--ignoresize] [-i|--install] [--justdb] [--nodeps] [--nofiledigest]
        [--nocontexts] [--noorder] [--noscripts] [--notriggers]
        [--nocollections] [--oldpackage] [--percent] [--prefix=<dir>]
        [--relocate=<old>=<new>] [--replacefiles] [--replacepkgs] [--test]
        [-U|--upgrade <packagefile>+] [-D|--define “MACRO EXPR”]
        [--undefine=MACRO] [-E|--eval “EXPR”] [--macros=<FILE:…>]
        [--nodigest] [--nosignature] [--rcfile=<FILE:…>] [-r|--root ROOT]
        [--dbpath=DIRECTORY] [--querytags] [--showrc] [--quiet]
        [-v|--verbose] [--version] [-?|--help] [--usage] [--scripts]
        [--setperms] [--setugids] [--conflicts] [--obsoletes] [--provides]
        [--requires] [--info] [--changelog] [--xml] [--triggers] [--last]
        [--dupes] [--filesbypkg] [--fileclass] [--filecolor] [--fscontext]
        [--fileprovide] [--filerequire] [--filecaps]

If you encounter this problem, follow the above methods and hope to solve your problem note: select the corresponding system version and GPG key file

Similar Posts: