So I was trying to upgrade openssl and decided to remove the existing openssl packages because it was from a different repository.

Once removed, I can't no longer get either yum or wget to work again because they all seem to rely on ssl

I'm missing the files


I was able to recover libssl.so.10 by using libssl3.so that existed locally, but not with libcrypto.so.10 yet (since this file probably need to be downloaded from a remote location).


The error leading to this problem was:
libcrypto.so.10: cannot open shared object file: No such file or directory


wget: error while loading shared libraries: libcrypto.so.10:

In other words, I'm now in a catch-22; I can't use yum, wget, curl, rpm (with url), or rsync (by connecting to a backup server instance) because they all require ssl lib files.

I can't even open a new SSH to the problematic server since SSL lib files is now gone. (can only access with existing Putty prompt).

I try "copy and paste" the file content with VIM editor using another snapshot backup but doesn't seem working.

I'm thinking if there is a way to download a rpm or even a single file over plain http using existing tools not listed above...

  • 2
    Just nuke it from orbit and restore. Playing with packages is like playing with explosives. You really need to have an idea on what you're doing. Even then it's a terrible idea. – Jacob Apr 8 '14 at 5:54
  • For a copy-paste solution: you must first uuencode the file ... this is a bad solution anyway. – Ouki Apr 8 '14 at 7:30
  • What about perl basic LWP::Simple approach (it might not need ssl). Of course, you had to double check the MD5 of any file you get this way. Either lwp-mirror <url> <file> or perl -MLWP::Simple -e 'mirror "<url>", file' (you need of course Perl and LWP::Simple already installed). – Ouki Apr 8 '14 at 7:45
  • I wonder whether the actual file contents are still on disk (since the lib is still in use by the existing SSH connection). In superficial tests I found the lib and the inode number in /proc/<pid>/maps but couldn't find the file for that inode any more. Anyone has more experience with this? – oliver Apr 8 '14 at 11:23

NOT SO GOOD. Try and avoid --force in RPM command unless you know what you're doing.

To try and recover to a decent state so you can attempt proper recovery, run from the backup or another identical server:

# tar cfz - $(rpm -ql openssl) | base64 > oh_my_god_what_did_I_do

Copy the output of that (in the oh_my_god_what_did_I_do file) into the clipboard and paste it into the other server:

# cat > oh_my_god_what_did_I_do
(paste here)
# cd /; base64 -d < oh_my_god_what_did_I_do | tar xfz -

Good luck.

(if you're savvy, you can come up with other ways to move that file. NFS, netcat, it's not hard to find something)

| improve this answer | |
  • +1 Thank you MikeyB. Your method worked. The binary data need to be base64 encoded if they are to be transferred by copy & paste. – zzzplayer Apr 8 '14 at 16:45

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.