Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 ?

share|improve this question
    
After resolving this issue as per Pere's suggestion, I got a similar issue with libexpat.so.0. Had to do the following: ln -s /lib/i386-linux-gnu/libexpat.so.1 /lib/libexpat.so.0 –  Sukanto Feb 1 '12 at 13:23
add comment

1 Answer

up vote 0 down vote accepted

The libncruses library is actually in /lib/libncurses.so.5.

Just make a symlink to /lib/libncurses.so.5 (or the right version, /lib/libncurses.so.5.9 in my system) into /usr/lib/libtermcap.so.2 and it will work.

share|improve this answer
    
Thanks Pere it worked :) –  Sukanto Feb 1 '12 at 13:26
add comment

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.