Good day!
While trying to recover a box to lenny it seems I've broken things. It upgrades libc
and glib
after that dpkg seems to be broken.
I can run apt-get
, but it gets segmentation fault from dpkg:
# apt-get -f install
Reading package lists... Done
Building dependency tree... Done
0 upgraded, 0 newly installed, 0 to remove and 316 not upgraded.
9 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
/bin/sh: line 1: 4606 Segmentation fault /usr/sbin/dpkg-preconfigure --apt
E: Sub-process /usr/bin/dpkg received a segmentation fault.
I can login via SSH but even ls is not working:
# ls
Segmentation fault
Is there anything I can do remotelly via SSH?
# ldd /bin/ls
linux-gate.so.1 => (0xffffe000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7fc8000)
libacl.so.1 => /lib/libacl.so.1 (0xb7fc2000)
libselinux.so.1 => /lib/libselinux.so.1 (0xb7fac000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7e51000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7e3f000)
/lib/ld-linux.so.2 (0xb7fd8000)
libattr.so.1 => /lib/libattr.so.1 (0xb7e3b000)
libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7e37000)
libsepol.so.1 => /lib/libsepol.so.1 (0xb7df6000)
It seems I've temporary fixed it with:
# touch /etc/ld.so.nohwcap
From here: http://saintaardvarkthecarpeted.com/blog/archive/2005/08/_etc_ld_so_nohwcap.html
I think you should enable core file dumping by
ulimit -c unlimited
and run the failing program to get a coredump then. If you are lucky andgdb
is installed and not segfaulting, you can analyze a coredump in place bygdb -c core.pid
. It will show you at least an address of failing instruction so you will able to guess the failing lib from that address. Ifgdb
is not installed, try toscp
the coredump to some other host. Next step is probably to replace the failing lib by some other version from some other host byscp
.