Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
4  
apt-get? in CentOS? –  dawud Jul 18 '13 at 19:52
    
Some people suggested it, remobing libssl takes down yum, which is the main issue –  Jay Jul 18 '13 at 20:02
    
Depending on how you installed the file you need is likely findable on your install media, in cached packages, or on a rpm mirror on the network. If you can get yum / rpm to tell you which package the file was in and get that file you should be able to make repairs. –  adric Jul 18 '13 at 20:15

4 Answers 4

up vote 1 down vote accepted

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!

share|improve this answer

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.

share|improve this answer
    
Rather than sneakernet you can probably use simple tools to do this over the network (without security) once you have the file, such as netcat or possibly ftp. –  adric Jul 18 '13 at 20:13
1  
The problem is that you'd have to find one that doesn't even link to ssl. The missing library won't just prevent the use of SSL features; any program that has SSL features coming from libssl at all won't be able to be linked and can't run at all. –  Falcon Momot Jul 18 '13 at 20:19
1  
Yep. netcat (the old simpleminded one) is one way to win here. EG on SU: superuser.com/questions/98089/sending-file-via-netcat –  adric Jul 18 '13 at 20:26

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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