Centos – How to fix “yum update” issue on CentOS

centospythonrpmyum

I get the following error when I do sudo yum update. The only thing I did before getting the error is install Python 2.7 in different directory than Python 2.4. The default Python is still 2.4 on the server:

 Error: Missing Dependency: php-common = 5.2.4-el5.centos is needed by package php-mhash
 Error: Missing Dependency: libnss3.so(NSS_3.12) is needed by package libcurl
 Error: Missing Dependency: libnssutil3.so is needed by package libcurl

Here is the whole command:

sudo yum update
Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
rightscale                100% |=========================|  951 B    00:00     
Reading repository metadata in from local files
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package php-xml.i386 0:5.3.2-1 set to be updated
---> Package git.i386 0:1.6.4.2-1 set to be updated
---> Package perl-Git.i386 0:1.6.4.2-1 set to be updated
---> Package php-mysql.i386 0:5.3.2-1 set to be updated
---> Package mysql.i386 0:5.0.89-1 set to be updated
---> Package mysql-devel.i386 0:5.0.89-1 set to be updated
---> Package php-pdo.i386 0:5.3.2-1 set to be updated
---> Package GeoIP.i386 0:1.4.7-0.1.20090931cvs set to be updated
---> Package autoconf.noarch 0:2.63-2 set to be updated
---> Package sqlite.i386 0:3.6.17-1 set to be updated
---> Package php-mcrypt.i386 0:5.3.2-1 set to be updated
---> Package php-pear.noarch 1:1.9.0-1 set to be updated
---> Package GeoIP-devel.i386 0:1.4.7-0.1.20090931cvs set to be updated
---> Package php-pecl-memcache.i386 0:3.0.4-3 set to be updated
---> Package php-devel.i386 0:5.3.2-1 set to be updated
---> Package mysql-server.i386 0:5.0.89-1 set to be updated
---> Package php-cli.i386 0:5.3.2-1 set to be updated
---> Package m4.i386 0:1.4.12-2 set to be updated
---> Package php-gd.i386 0:5.3.2-1 set to be updated
---> Package php.i386 0:5.3.2-1 set to be updated
---> Package php-common.i386 0:5.3.2-1 set to be updated
--> Running transaction check
--> Processing Dependency: libedit.so.0 for package: php-cli
--> Processing Dependency: libltdl.so.3 for package: php-mcrypt
--> Processing Dependency: php-common = 5.2.4-el5.centos for package: php-mhash
--> Processing Dependency: libt1.so.5 for package: php-gd
--> Processing Dependency: libcurl.so.4 for package: php-common
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package t1lib.i386 0:5.1.1-7.el5 set to be updated
---> Package libedit.i386 0:2.11-1.20080712cvs.el5 set to be updated
---> Package libcurl.i386 0:7.19.6-5 set to be updated
---> Package libtool-ltdl.i386 0:1.5.22-6.1 set to be updated
--> Running transaction check
--> Processing Dependency: libnss3.so(NSS_3.12) for package: libcurl
--> Processing Dependency: libssh2.so.1 for package: libcurl
--> Processing Dependency: php-common = 5.2.4-el5.centos for package: php-mhash
--> Processing Dependency: libnssutil3.so for package: libcurl
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package libssh2.i386 0:0.18-9.el5 set to be updated
--> Running transaction check
--> Processing Dependency: libnss3.so(NSS_3.12) for package: libcurl
--> Processing Dependency: php-common = 5.2.4-el5.centos for package: php-mhash
--> Processing Dependency: libnssutil3.so for package: libcurl
--> Finished Dependency Resolution
Error: Missing Dependency: php-common = 5.2.4-el5.centos is needed by package php-mhash
Error: Missing Dependency: libnss3.so(NSS_3.12) is needed by package libcurl
Error: Missing Dependency: libnssutil3.so is needed by package libcurl

Best Answer

The problem comes from the "rightscale" repository. You probably installed php-5.2 ,and php-mhash from this repository, and it looks that now they want to upgrade your system to php-5.3 but they did not upgrade propeprly all the modules..

I suggest that you run:

yum --disablerepo rightscale update

And have a look to what happens. In order to update your php packages you should either contact rightscale and report them the problem, or use only the packages from Centos/Redhat/ScientificLinux ( whatever your base distro is, php-5.1 and php53 are available ) , or an other 3rd party such as "ius" in order to get extra packages such as php-5.2