Bug 1477308 - Installing new nss-softokn-freebl without updating nspr on a RHEL 7.3.0 system results in rpm and yum being non-functional
Summary: Installing new nss-softokn-freebl without updating nspr on a RHEL 7.3.0 syste...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nss-softokn
Version: 7.4
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Daiki Ueno
QA Contact: Hubert Kario
URL:
Whiteboard:
: 1476031 (view as bug list)
Depends On:
Blocks: 1420851 1477588 1515890
TreeView+ depends on / blocked
 
Reported: 2017-08-01 18:05 UTC by Kyle Walker
Modified: 2021-06-10 12:42 UTC (History)
22 users (show)

Fixed In Version: nss-softokn-3.34.0-0.2.beta1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1477588 (view as bug list)
Environment:
Last Closed: 2018-04-10 09:44:43 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1515890 0 medium CLOSED rpm reports on chroot install "error: Failed to initialize NSS library" 2021-02-22 00:41:40 UTC
Red Hat Knowledge Base (Solution) 3134931 0 None None None 2017-08-01 18:39:58 UTC
Red Hat Product Errata RHEA-2018:0679 0 None None None 2018-04-10 09:46:03 UTC

Internal Links: 1515890

Description Kyle Walker 2017-08-01 18:05:29 UTC
Description of problem:
 The nss-softokn packaging does not have a requirement for a matching nspr package. As a result, the installation of the glibc.i686 package pulls in nss-softokn-freebl, but not the additionally required nspr version.


Version-Release number of selected component (if applicable):
 nss-softokn-freebl-3.28.3-6.el7

How reproducible:
 Easily

Steps to Reproduce:
1. Install a RHEL 7.3 system
2. yum install glibc.i686
3. rpm -qa

Actual results:
 # rpm -qa
 error: Failed to initialize NSS library

Expected results:
 # rpm -qa
 <Return RPM database contents>

Additional info:
 Once the issue has been seen, the yum and rpm utilities are functionally broken. Manually loading the updated nspr library via LD_PRELOAD seems to resolve the condition temporarily, and can be used to update the nspr package manually.

Comment 3 Kyle Walker 2017-08-01 18:18:37 UTC
Issue also presents itself as:

# yum repolist
error: Failed to initialize NSS library
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   cannot import name ts

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.7.5 (default, Aug  2 2016, 04:20:16) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://yum.baseurl.org/wiki/Faq
  

- Kyle Walker

Comment 7 Stefan Dordevic 2017-08-02 10:33:55 UTC
So this is workaround for broken system.

1. Use wget, or any other way to get the needed nspr package from the repository.
   
   needed package: nspr-4.13.1-1.0.el7_3

2. get the nspr libraries out from rpm

   rpm2cpio nspr-4.13.1-1.0.el7_3.x86_64.rpm |cpio -imdv

3. copy them to /usr/lib64/
 
   cp usr/lib64/* /usr/lib64/

This should solve the problem. Use the proper rpm for architecture of your system.
And make sure you are hitting the right paths also.

Comment 9 Hubert Kario 2017-08-02 12:07:41 UTC
The issue will happen only on systems that are updating nss-softokn-freebl alone and do not have https://rhn.redhat.com/errata/RHEA-2017-0460.html (nspr-4.13.1-1.0.el7_3) installed.

Comment 12 karan singh 2017-09-04 16:07:18 UTC
Guys, i am hitting the same problem on RHEL 7.2 and the solution mentioned above does not fix it.

Any hints


[root@mon-node1 tmp]# rpm2cpio nspr-4.13.1-1.0.el7_3.i686.rpm | cpio -imdv
error: Failed to initialize NSS library
./usr/lib/libnspr4.so
./usr/lib/libplc4.so
./usr/lib/libplds4.so
555 blocks
[root@mon-node1 tmp]# cp usr/lib/* /usr/lib64/
cp: overwrite ‘/usr/lib64/libnspr4.so’? y
cp: overwrite ‘/usr/lib64/libplc4.so’? y
cp: overwrite ‘/usr/lib64/libplds4.so’? y
[root@mon-node1 tmp]#
[root@mon-node1 tmp]#
[root@mon-node1 tmp]# yum repolist
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   libplc4.so: wrong ELF class: ELFCLASS32

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.7.5 (default, Oct 11 2015, 17:47:16)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]

If you cannot solve this problem yourself, please go to
the yum faq at:
  http://yum.baseurl.org/wiki/Faq


[root@mon-node1 tmp]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.2 (Maipo)
[root@mon-node1 tmp]# uname -a
Linux mon-node1 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@mon-node1 tmp]#

Comment 13 Stanislav Zidek 2017-09-05 10:01:30 UTC
Just a guess - i686 vs. x86_64 architecture? Did you try with x86_64 rpm?

Comment 14 karan singh 2017-09-05 10:28:29 UTC
No, I have not, Could you help me with the correct package download link.

Comment 16 karan singh 2017-09-05 10:58:41 UTC
@Stanislav Zidek 

Thanks a lot, x86_64 rpm worked as expected.

Comment 17 dave 2017-09-06 17:03:17 UTC
We had a similar issue with a new 7.1 host. Initially the PRELOAD did not work. In order to work around this issue, we repulled the latest katello cert and installed that with --force with the LD_PRELOAD=./... 

hope this helps.

Thanks,
Dave

Comment 18 Andreas Karis 2017-09-07 14:54:23 UTC
*** Bug 1476031 has been marked as a duplicate of this bug. ***

Comment 33 errata-xmlrpc 2018-04-10 09:44:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:0679


Note You need to log in before you can comment on or make changes to this bug.