Re: relocation error: and segmentation fault
Dennis Wicks (firstname.lastname@example.org on 2011-12-03 13:38 -0600):
> It looks like I am going to have to restore some libraries
> at the least.
> Is there any way that I can refresh or reinstall my system
> without wiping out all the other things I have on the same
> disk? eg /home and other user directories and optional software.
Can you still run dpkg? Then your best bet is to use a different
machine to download just enough to get apt working again (that's only
libc6, libgcc1, libstdc++6 and zlib1g on testing). If some configure
script cannot run because of a missing library, you can postpone it by
using dpkg --unpack instead of dpkg -i.
When you have apt working, you can work on restoring the rest of your
system. My advice would be to (re)install aptitude first, see below why.
You can use ldd to find out which libraries are missing, and dpkg -S to
get the package to which they belong. As an example:
$ ldd `which apt-get`
linux-gate.so.1 => (0xf7757000)
libapt-pkg.so.4.10 => /usr/lib/libapt-pkg.so.4.10 (0xf7634000)
libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (..)
libz.so.1 => /usr/lib/libz.so.1 (0xf7390000)
$ dpkg -S /usr/lib/libz.so.1
If libraries are missing, they will show as '=> not found'. That means
you will have to guess the full path, use another system as reference,
use apt-file to search for the package, or just guess. Most libraries
are in /lib or /usr/lib on Squeeze, but on Wheezy you'll find some in
the old location and most in an architecture-specific location such as
When you have aptitude working, you're almost home. A full system
rebuild can be done with
# aptitude reinstall ~i
Or just the libraries:
# aptitude reinstall ~slibs
(Don't about the tons of "not installed, so not reinstall" messages).
Best of luck,