0

Issue: A RHEL VM host is not accessible via ssh.

Root cause of the issue: Accidentally a shared library zlib is removed from the rpm package of the machine. Making it to fail all needed commands such as yum, ssh, scp, wget and rpm with the following error.

 error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

Additional detail: The missing library is copied from another server to a user home directory (myuser) in the machine: /home/(myuser)/usr/{lib, lib64, share}/*

Does copying these directories to /usr/{lib, lib64, share}/*, which require administrator (root) privilege, fix the issue?

Currently, the machine cannot be connected via ssh.

Is there a way to get into the box without using ssh?

  • 5
    Boot into a rescue system and fix this from there. – Sven Apr 25 '18 at 18:06
  • 2
    Use the server (remote) console. – Michael Hampton Apr 25 '18 at 23:03
  • 1
    Or you can mount the volume into another running linux and fix it there. Similar to what @Sven suggested. – Ondřej Xicht Světlík Apr 26 '18 at 5:59
2

Connect to the machine via the console from the hypervisor,

You can log in with the root credentials, and do all you need to be able to do.

0

As per Sven's comment, booting into a rescue system and then copying the library fixed the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.