Articles: Fix for Broken Yum on CentOS 5.x with Python Error Message

Posted by: david on 08/06/2015 - 10:45 PM

So I was looking to upgrade PHP on one of my servers running CentOS 5.7 from PHP 5.3.x to PHP 5.5. I wanted to get it to 5.6 actually but unfortunately there is no such package available on Webtactic.com. But anyways I began the process by running the command:


  yum install yum-plugin-replace


Which resulted in a shocking error message:



There was a problem importing one of the Python modules

required to run yum. The error leading to this problem was:


/usr/lib/libnssutil3.so: undefined symbol: opyAlgorithmID_Util, version NSSUTIL_3.12


Please install a package which provides this module, or

verify that the module is installed correctly.


It's possible that the above module doesn't match the

current version of Python, which is:

2.4.3 (#1, Sep 21 2011, 20:06:00)

[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)]



Wow- I didn't even realize yum was broken on this server, and from which one, I do not know. I did a quick query of the last packages history installed with the following command:


  rpm -qa --last | less


The result was:



php-pear-1.4.9-8.el5 Tue 22 Apr 2014 09:51:47 PM CDT

gcc-c++-4.1.2-54.el5 Thu 29 Aug 2013 09:46:14 PM CDT

libstdc++-devel-4.1.2-54.el5 Thu 29 Aug 2013 09:46:12 PM CDT

gcc-gfortran-4.1.2-54.el5 Thu 29 Aug 2013 09:46:08 PM CDT

gcc-4.1.2-54.el5 Thu 29 Aug 2013 09:46:07 PM CDT

cpp-4.1.2-54.el5 Thu 29 Aug 2013 09:46:05 PM CDT

libgfortran-4.1.2-54.el5 Thu 29 Aug 2013 09:46:03 PM CDT

libstdc++-4.1.2-54.el5 Thu 29 Aug 2013 09:46:02 PM CDT

libgcc-4.1.2-54.el5 Thu 29 Aug 2013 09:46:01 PM CDT

php-gd-5.3.27-2.w5 Thu 18 Jul 2013 11:28:22 PM CDT

php-xmlrpc-5.3.27-2.w5 Thu 18 Jul 2013 11:28:21 PM CDT

php-mysql-5.3.27-2.w5 Thu 18 Jul 2013 11:28:21 PM CDT

php-mbstring-5.3.27-2.w5 Thu 18 Jul 2013 11:28:20 PM CDT

php-xml-5.3.27-2.w5 Thu 18 Jul 2013 11:28:19 PM CDT

php-pspell-5.3.27-2.w5 Thu 18 Jul 2013 11:28:19 PM CDT

php-process-5.3.27-2.w5 Thu 18 Jul 2013 11:28:19 PM CDT

php-devel-5.3.27-2.w5 Thu 18 Jul 2013 11:28:18 PM CDT

php-pdo-5.3.27-2.w5 Thu 18 Jul 2013 11:28:17 PM CDT

php-5.3.27-2.w5 Thu 18 Jul 2013 11:28:17 PM CDT

php-cli-5.3.27-2.w5 Thu 18 Jul 2013 11:28:15 PM CDT

php-common-5.3.27-2.w5 Thu 18 Jul 2013 11:28:13 PM CDT

....





It looked like php-pear or gcc were the culprits, but regardless, I needed to fix this problem. I searched for libnssutil3.so on rpmfind.net, then looked for CentOS 5.x results:



To make a long story short, I downloaded the following 2 packages from there:

  • nss-3.18.0-6.el5_11.i386.rpm

  • nss-devel-3.18.0-6.el5_11.i386.rpm

But when I tried to install them via rpm, I got the following error:


error: Failed dependencies:
nspr >= 4.10.8 is needed by nss-3.18.0-6.el5_11.i386
nspr-devel >= 4.10.8 is needed by nss-devel-3.18.0-6.el5_11.i386
nss = 3.12.10-7.el5_7 is needed by (installed) nss-tools-3.12.10-7.el5_7.i386


I figured that NSS 3.18 is a minor upgrade to 3.12, so it shouldn't be a problem to force them to install, so I ran:

rpm -Uvh --force --nodeps nss*


And forced the two packages to install. Yum now works thankfully, and I was able to happily upgrade PHP to 5.5 using it. Hope this tidbit helps anyone out there with the same or a similar problem!