Unlinked libc.so.6 library accidenatally. How to recover the system ?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux

Issue

  • Most commands are not working and the following error message is seen:
error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
  • The library libc.so.6 appears to have been unlinked.
unlink libc.so.6

Resolution

  • The links and permissions for libc.so.6 should be similar to the following example:
# ll /lib/libc.so.6 ; ll /lib64/libc.so.6
lrwxrwxrwx 1 root root 11 Sep 28 05:35 /lib/libc.so.6 -> libc-2.5.so
lrwxrwxrwx 1 root root 11 Sep 28 05:34 /lib64/libc.so.6 -> libc-2.5.so
  • If the links appear correct, then the /lib/libc.so.6 and /lib64/libc.so.6 files may need to be copied for a known working system of the same major release version.

  • If the system is not functioning and is not stable enough to use, then rescue mode can be used to verify and perform the listed steps available at: Booting into Rescue Mode

Root Cause

The libc.so.6 library was unlinked or not properly linked which caused numerous application errors.

  • Component
  • rpm

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.