How to Fix GPG Key Retrieval Failed Errno 14 Curl#37 in Centos 7

In some cases, when you install some packages on your CentOS 7. You get the following error:

Total size: 7.4 M
Installed size: 27 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/fbi/packages/vim-common-7.4.629-8.el7_9.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 18cd4a9e: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-eurolinux7

GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-eurolinux7"

This is because the following GPG key is listed in the configuration file for your yum repository in your /etc/yum.repos.d directory.

You can also disable GPC check without editing repo file with .

yum install --nogpgcheck nginx vim wget net-tools -y

As you can see, the error was gone, and the packages are installed.

[root@banq]# yum install --nogpgcheck nginx vim wget net-tools -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.centos.iad1.serverforge.org
 * extras: centos.mirror.constant.com
 * updates: centos.mirror.constant.com
Package wget-1.14-18.el7_6.1.x86_64 already installed and latest version
Package net-tools-2.0-0.25.20131004git.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package nginx.x86_64 1:1.22.1-1.el7.ngx will be installed
--> Processing Dependency: libpcre2-8.so.0()(64bit) for package: 1:nginx-1.22.1-1.el7.ngx.x86_64
---> Package vim-enhanced.x86_64 2:7.4.629-8.el7_9 will be installed
--> Processing Dependency: vim-common = 2:7.4.629-8.el7_9 for package: 2:vim-enhanced-7.4.629-8.el7_9.x86_64
--> Processing Dependency: libgpm.so.2()(64bit) for package: 2:vim-enhanced-7.4.629-8.el7_9.x86_64
--> Running transaction check
---> Package gpm-libs.x86_64 0:1.20.7-6.el7 will be installed
---> Package pcre2.x86_64 0:10.23-2.el7 will be installed
---> Package vim-common.x86_64 2:7.4.629-8.el7_9 will be installed
--> Processing Dependency: vim-filesystem for package: 2:vim-common-7.4.629-8.el7_9.x86_64
--> Running transaction check
---> Package vim-filesystem.x86_64 2:7.4.629-8.el7_9 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================
 Package                                   Arch                              Version                                         Repository                        Size
====================================================================================================================================================================
Installing:
 nginx                                     x86_64                            1:1.22.1-1.el7.ngx                              nginx                            797 k
 vim-enhanced                              x86_64                            2:7.4.629-8.el7_9                               fbi                              1.0 M
Installing for dependencies:
 gpm-libs                                  x86_64                            1.20.7-6.el7                                    base                              32 k
 pcre2                                     x86_64                            10.23-2.el7                                     base                             201 k
 vim-common                                x86_64                            2:7.4.629-8.el7_9                               fbi                              5.3 M
 vim-filesystem                            x86_64                            2:7.4.629-8.el7_9                               fbi                               11 k

Transaction Summary
====================================================================================================================================================================
Install  2 Packages (+4 Dependent packages)

Total size: 7.4 M
Installed size: 27 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : gpm-libs-1.20.7-6.el7.x86_64                                                                                                                     1/6
  Installing : 2:vim-filesystem-7.4.629-8.el7_9.x86_64                                                                                                          2/6
  Installing : 2:vim-common-7.4.629-8.el7_9.x86_64                                                                                                              3/6
  Installing : pcre2-10.23-2.el7.x86_64                                                                                                                         4/6
  Installing : 1:nginx-1.22.1-1.el7.ngx.x86_64                                                                                                                  5/6
----------------------------------------------------------------------

Thanks for using nginx!

Please find the official documentation for nginx here:
* https://nginx.org/en/docs/

Please subscribe to nginx-announce mailing list to get
the most important news about nginx:
* https://nginx.org/en/support.html

Commercial subscriptions for nginx are available on:
* https://nginx.com/products/

----------------------------------------------------------------------
  Installing : 2:vim-enhanced-7.4.629-8.el7_9.x86_64                                                                                                            6/6
  Verifying  : pcre2-10.23-2.el7.x86_64                                                                                                                         1/6
  Verifying  : 2:vim-common-7.4.629-8.el7_9.x86_64                                                                                                              2/6
  Verifying  : 2:vim-filesystem-7.4.629-8.el7_9.x86_64                                                                                                          3/6
  Verifying  : gpm-libs-1.20.7-6.el7.x86_64                                                                                                                     4/6
  Verifying  : 2:vim-enhanced-7.4.629-8.el7_9.x86_64                                                                                                            5/6
  Verifying  : 1:nginx-1.22.1-1.el7.ngx.x86_64                                                                                                                  6/6

Installed:
  nginx.x86_64 1:1.22.1-1.el7.ngx                                               vim-enhanced.x86_64 2:7.4.629-8.el7_9

Dependency Installed:
  gpm-libs.x86_64 0:1.20.7-6.el7        pcre2.x86_64 0:10.23-2.el7        vim-common.x86_64 2:7.4.629-8.el7_9        vim-filesystem.x86_64 2:7.4.629-8.el7_9

Complete!

Hope this post helps you solve your problem.

Leave a Comment

Required fields are marked *