Ctrl+Ced yum while it was "updating glibc-common-2.17-222.el7.x86" and now yum cannot run

General support questions
Post Reply
Zamiel
Posts: 3
Joined: 2018/06/15 19:43:43

Ctrl+Ced yum while it was "updating glibc-common-2.17-222.el7.x86" and now yum cannot run

Post by Zamiel » 2018/06/15 19:56:54

Greetings,

After doing a "yum update -y", I accidentally hit Ctrl+C while it was updating the following package, "glibc-common-2.17-222.el7.x86":

Code: Select all

  Updating   : glibc-common-2.17-222.el7.x86 [############################ ]   9/554^                                                                                          Updating   : glibc-common-2.17-222.el7.x86_64                                9/554
[root@centos ~]# 
Now, whenever I run the "yum" command, the following output is displayed:

Code: Select all

[root@centos-01 ~]# yum
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  4 2017, 00:39:18)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]

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

And when I run "rpm", the following error is displayed:

Code: Select all

error: Failed to initialize NSS library
What can I do to fix this? Do I have to reinstall the operating system?



Additional information:

The following is the output of "uname -a":

Code: Select all

[root@centos ~]# uname -a
Linux centos 3.10.0-693.11.6.el7.x86_64 #1 SMP Thu Jan 4 01:06:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
The following is the output of "cat /etc/*release":

Code: Select all

[root@centos ~]# cat /etc/*release
CentOS Linux release 7.4.1708 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.4.1708 (Core)
CentOS Linux release 7.4.1708 (Core)

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Ctrl+Ced yum while it was "updating glibc-common-2.17-222.el7.x86" and now yum cannot run

Post by TrevorH » 2018/06/16 11:36:22

When you get that error, are you booted into the operating system with the problem or have you booted something else and use chroot to get into your installed system? If the latter then you will need to bind mount the booted system's /proc, /dev and /sys filesystems on top of the chroot directory before you chroot into it. More specifically, it now requires access to /dev/urandom and the lack of that device will cause the symptoms you see.

If you're booted into the system with the problem (as opposed to being in a chroot) then you need to do something a little different. This is a known problem discussed here but you need to login to be able to read it. If you do not have an account then one of the free Developer subscriptions will let you login to read it. For more information on the free Red Hat Developer subscription please see http://developers.redhat.com/blog/2016/ ... available/
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Zamiel
Posts: 3
Joined: 2018/06/15 19:43:43

Re: Ctrl+Ced yum while it was "updating glibc-common-2.17-222.el7.x86" and now yum cannot run

Post by Zamiel » 2018/06/19 05:09:25

Hey Trevor; thanks for the response.

I am booted into the operating system normally using SSH (as it is a remote server).

I was able to sign up for a free RedHat Developer subscription; thanks for the link. However, the solution provided did not work; I still get the same error even when using the downloaded library.

Any other tips?

Post Reply