GPG key retrieval failed: [Errno 5] OSError: [Errno 2] No such file or directory: /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Earlier while upgrading PHP to version 5.3.5 on a CentOS server I copied over the details of the remi repository from another server I had upgraded PHP on. Once I started the transaction all looked well until Yum needed to verify the remi repo RPM GPG key which I had not installed so an error was provided and Yum stopped the PHP upgrade process. You can get around the RPM GPG key error by simply using the –nogpgcheck switch however that is not the correct way to resolve the problem. You should instead install the RPM GPG key and the below example shows how to install the RPM GPG key for the remi repo.