I deleted libssl.so.10

I cannot apt-get, I deleted libssl.so.10

most commands including wget give me something to the ends of libssl.so.10: cannot open shared object file: No such file or directory

is there a reliable way I can back down all of my data while i still have an active connection.


Solution 1:

Did you really deleted the real .so file or only the soft link which pointed to real .so file, so can the library creators dinamically refresh libraries whitour recompile all of programs in system.

if you deleted only the softlink, let's find it!

Use

find /usr/lib | grep libssl

to locate the real .so file, if you finded it, recreate the soft link with:

 ln /usr/lib/path/to/real/libssl /lib/libssl.so.10

Maybe the programs (now: apt-get) try to reach the shared libraries in a specified path, which compiled into the program, locate your program with:

which apt-get

(my result is: /usr/bin/apt-get)

and find in the program the "potential" shared libraries locations with:

strings /path/to/your/program

(my result is:

/lib64/ld-linux-x86-64.so.2
libapt-pkg.so.4.12
libutil.so.1
libstdc++.so.6
libm.so.6
libgcc_s.so.1
libc.so.6
__libc_start_main
   install - Install new packages (pkg is libc6 not libc6.deb)

)

aha it's use statically /lib64/ld-linux-x86-64.so.2

(Looks like my apt-get compiled whitout libssl)

Let's give a try!

Solution 2:

The best thing to do would be to find libssl.so.10 from a working computer running the same version of openssl that you were (a different centos machine running the same version should be sufficient), and use a USB stick to copy the file back into place.

Solution 3:

In order to fix this you need to replace the file. One way that's been mentioned is to copy the library from another system, another way is to reinstall the package that provides it.

You mention using apt-get so I'm going to assume you're using Ubuntu. The first step is to see exactly what package you need to install for that file. If you run the command `

dpkg -S libssl.so.10

You will get output similar to this, from my Ubuntu 12.04.2 system

libssl1.0.0: /lib/x86_64-linux-gnu/libssl.so.1.0.0

Then running dpkg -l | grep libssl1.0.0 gives me

ii  libssl1.0.0                          1.0.1-4ubuntu5.10                        SSL shared libraries

This tells us that I need to go find libssl1.0.0 version 1.0.1-4ubuntu5.10 and install it. The packages can be downloaded from

http://us.archive.ubuntu.com/ubuntu/pool/main/o/openssl/

Searching in that list I can find that I need to download the file libssl1.0.0_1.0.1-4ubuntu5.10_amd64.deb using the method of your choice.

Once you have the file downloaded you can reinstall the package by issuing a

dpkg -i libssl1.0.0_1.0.1-4ubuntu5.10_amd64.deb 

Which any luck you'll now be the brand new owner of a fresh libssl.

Solution 4:

I had an issue similair to this in the past. The end solution was me installing the server OS on my laptop with VirtualBox inatalled. I fetched the files from my virtualbox guest and put them on the server using a USB Drive as @Falcon Momot metioned. A good thing came out of this for me. I ended up using virtualbox for playing around with stuff before I did it on the actual server.