Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 =>  (0xffffe000) => /lib/tls/i686/cmov/ (0xb7fc8000) => /lib/ (0xb7fc2000) => /lib/ (0xb7fac000) => /lib/i686/cmov/ (0xb7e51000) => /lib/tls/i686/cmov/ (0xb7e3f000)
    /lib/ (0xb7fd8000) => /lib/ (0xb7e3b000) => /lib/i686/cmov/ (0xb7e37000) => /lib/ (0xb7df6000)

It seems I've temporary fixed it with:

 # touch /etc/

From here:

share|improve this question
Can you execute other commands like less to view log files? – Khaled Feb 4 '11 at 11:45
Yes, less, tail work. – artvolk Feb 4 '11 at 12:03

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 and gdb is installed and not segfaulting, you can analyze a coredump in place by gdb -c It will show you at least an address of failing instruction so you will able to guess the failing lib from that address. If gdb is not installed, try to scp the coredump to some other host. Next step is probably to replace the failing lib by some other version from some other host by scp.

share|improve this answer
It seems I've fixed it temporary with touch /etc/ – artvolk Feb 4 '11 at 14:29

Your Answer


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.