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.
Error Upgrading PHP Using The Remi Repo On CentOS Linux:
- [root@dev yum.repos.d]# yum --enablerepo=remi update php
- Loaded plugins: fastestmirror
- Loading mirror speeds from cached hostfile
- * addons: mirror.ubiquityservers.com
- * base: mirror.steadfast.net
- * centosplus: mirror.team-cymru.org
- * epel: mirror.steadfast.net
- * epel-source: mirror.steadfast.net
- * extras: mirror.steadfast.net
- * ius: mirror.rackspace.com
- * remi: rpms.famillecollet.com
- * rpmforge: apt.sw.be
- * updates: yum.singlehop.com
- addons | 951 B 00:00
- base | 2.1 kB 00:00
- centosplus | 1.9 kB 00:00
- epel | 3.7 kB 00:00
- epel-source | 2.9 kB 00:00
- extras | 2.1 kB 00:00
- ius | 1.9 kB 00:00
- remi | 2.6 kB 00:00
- remi/primary_db | 248 kB 00:00
- rpmforge | 1.1 kB 00:00
- rpmforge/primary | 2.2 MB 00:05
- rpmforge 10393/10393
- updates | 1.9 kB 00:00
- Setting up Update Process
- Resolving Dependencies
- --> Running transaction check
- --> Processing Dependency: php = 5.1.6-27.el5_5.3 for package: php-devel
- ---> Package php.x86_64 0:5.3.5-1.el5.remi.1 set to be updated
- --> Processing Dependency: php-cli = 5.3.5-1.el5.remi.1 for package: php
- --> Processing Dependency: php-common = 5.3.5-1.el5.remi.1 for package: php
- --> Running transaction check
- ---> Package php-cli.x86_64 0:5.3.5-1.el5.remi.1 set to be updated
- --> Processing Dependency: libedit.so.0()(64bit) for package: php-cli
- --> Processing Dependency: php-api = 20041225 for package: php-mcrypt
- --> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-pdo
- --> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-gd
- --> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-mysql
- ---> Package php-common.x86_64 0:5.3.5-1.el5.remi.1 set to be updated
- ---> Package php-devel.x86_64 0:5.3.5-1.el5.remi.1 set to be updated
- --> Running transaction check
- ---> Package libedit.x86_64 0:20090923-3.0_1.el5.rf set to be updated
- ---> Package php-gd.x86_64 0:5.3.5-1.el5.remi.1 set to be updated
- --> Processing Dependency: libt1.so.5()(64bit) for package: php-gd
- ---> Package php-mcrypt.x86_64 0:5.3.5-1.el5.remi.1 set to be updated
- ---> Package php-mysql.x86_64 0:5.3.5-1.el5.remi.1 set to be updated
- --> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: php-mysql
- --> Processing Dependency: libmysqlclient.so.16()(64bit) for package: php-mysql
- ---> Package php-pdo.x86_64 0:5.3.5-1.el5.remi.1 set to be updated
- --> Running transaction check
- ---> Package mysql-libs.x86_64 0:5.1.56-1.el5.remi set to be updated
- ---> Package t1lib.x86_64 0:5.1.2-1.el5.rf set to be updated
- --> Processing Dependency: libXmu.so.6()(64bit) for package: t1lib
- --> Processing Dependency: libXaw.so.7()(64bit) for package: t1lib
- --> Running transaction check
- ---> Package libXaw.x86_64 0:1.0.2-8.1 set to be updated
- ---> Package libXmu.x86_64 0:1.0.2-5 set to be updated
- --> Finished Dependency Resolution
- Dependencies Resolved
- ====================================================================================================================================
- Package Arch Version Repository Size
- ====================================================================================================================================
- Updating:
- php x86_64 5.3.5-1.el5.remi.1 remi 1.4 M
- Installing for dependencies:
- libXaw x86_64 1.0.2-8.1 base 329 k
- libXmu x86_64 1.0.2-5 base 63 k
- libedit x86_64 20090923-3.0_1.el5.rf rpmforge 272 k
- mysql-libs x86_64 5.1.56-1.el5.remi remi 1.7 M
- t1lib x86_64 5.1.2-1.el5.rf rpmforge 388 k
- Updating for dependencies:
- php-cli x86_64 5.3.5-1.el5.remi.1 remi 2.6 M
- php-common x86_64 5.3.5-1.el5.remi.1 remi 968 k
- php-devel x86_64 5.3.5-1.el5.remi.1 remi 622 k
- php-gd x86_64 5.3.5-1.el5.remi.1 remi 204 k
- php-mcrypt x86_64 5.3.5-1.el5.remi.1 remi 46 k
- php-mysql x86_64 5.3.5-1.el5.remi.1 remi 157 k
- php-pdo x86_64 5.3.5-1.el5.remi.1 remi 116 k
- Transaction Summary
- ====================================================================================================================================
- Install 5 Package(s)
- Upgrade 8 Package(s)
- Total download size: 8.7 M
- Is this ok [y/N]: y
- Downloading Packages:
- (1/13): php-mcrypt-5.3.5-1.el5.remi.1.x86_64.rpm | 46 kB 00:00
- (2/13): libXmu-1.0.2-5.x86_64.rpm | 63 kB 00:00
- (3/13): php-pdo-5.3.5-1.el5.remi.1.x86_64.rpm | 116 kB 00:00
- (4/13): php-mysql-5.3.5-1.el5.remi.1.x86_64.rpm | 157 kB 00:00
- (5/13): php-gd-5.3.5-1.el5.remi.1.x86_64.rpm | 204 kB 00:00
- (6/13): libedit-20090923-3.0_1.el5.rf.x86_64.rpm | 272 kB 00:06
- (7/13): libXaw-1.0.2-8.1.x86_64.rpm | 329 kB 00:00
- (8/13): t1lib-5.1.2-1.el5.rf.x86_64.rpm | 388 kB 00:02
- (9/13): php-devel-5.3.5-1.el5.remi.1.x86_64.rpm | 622 kB 00:01
- (10/13): php-common-5.3.5-1.el5.remi.1.x86_64.rpm | 968 kB 00:01
- (11/13): php-5.3.5-1.el5.remi.1.x86_64.rpm | 1.4 MB 00:01
- (12/13): mysql-libs-5.1.56-1.el5.remi.x86_64.rpm | 1.7 MB 00:01
- (13/13): php-cli-5.3.5-1.el5.remi.1.x86_64.rpm | 2.6 MB 00:02
- ------------------------------------------------------------------------------------------------------------------------------------
- Total 387 kB/s | 8.7 MB 00:23
- warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 00f97f56
- GPG key retrieval failed: [Errno 5] OSError: [Errno 2] No such file or directory: '/etc/pki/rpm-gpg/RPM-GPG-KEY-remi'
As you can see at the bottom of the above output Yum immediately stopped when it could not located the remi RPM GPG key or the RPM-GPG-KEY-remi file. Installing the remi repository RPM GPG key file is easy by using the below syntax.
Install Remi Repo RPM GPG Key On CentOS Linux:
- [root@dev yum.repos.d]# rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
- [root@dev yum.repos.d]#
After issuing the above command I was able to complete the upgrade of PHP to version 5.3.5 on this CentOS Linux server.
Thank you for this. I’m wondering though, how did you finish the upgrade? Did you yum –enablerepo=remi update php again? If so, what happened? Your assistance is greatly appreciated.
Hello einda,
In this instance I did use the remi repo for the PHP install but it will all depend on what version of PHP you want installed. Typically the remi repo has more bleeding edge versions of PHP so if you are looking for something more stable you may want to stay with the default CentOS PHP version.
Hope that helps.
Thanks.
alex