On my Ubuntu 11.10, I am running a version of gdb for different target other than host machine and I am getting the following error:
xxxxx-none-linux-gnu-gdb: error while loading shared libraries: /usr/lib/libtermcap.so.2: file too short
Following is the list of my libncurses and libtermcap on my host:
$ ls -l /usr/lib/libtermcap.*
lrwxrwxrwx 1 root root 12 2011-09-17 00:59 /usr/lib/libtermcap.a -> libncurses.a
lrwxrwxrwx 1 root root 13 2011-09-17 00:59 /usr/lib/libtermcap.so -> libncurses.so
lrwxrwxrwx 1 root root 22 2011-12-05 17:32 /usr/lib/libtermcap.so.2 -> /usr/lib/libncurses.so
$ ls -l /usr/lib/libncurses*
-rw-r--r-- 1 root root 221876 2011-09-17 00:59 /usr/lib/libncurses.a
-rw-r--r-- 1 root root 113216 2011-09-17 00:59 /usr/lib/libncurses++.a
-rw-r--r-- 1 root root 31 2011-09-17 00:59 /usr/lib/libncurses.so
$ cat /usr/lib/libncurses.so
INPUT(libncurses.so.5 -ltinfo)
$ uname -a
Linux hostname 3.0.0-13-generic-pae #22-Ubuntu SMP Wed Nov 2 15:17:35 UTC 2011 i686 i686 i386 GNU/Linux
How to get over this issue ?

ln -s /lib/i386-linux-gnu/libexpat.so.1 /lib/libexpat.so.0– Sukanto Feb 1 '12 at 13:23