Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-12-2004, 11:19 AM
|
#1
|
Member
Registered: Aug 2004
Distribution: gentoo, Fedora Core
Posts: 54
Rep:
|
libtermcap.so.2: cannot open shared object file: No such file or directory
Running a program get this error.
# ch
ch: error while loading shared libraries: libtermcap.so.2: cannot open shared object file: No such file or directory
However, libtermcap.so.2 is present.
# ls -l /lib/libtermcap*
lrwxrwxrwx 1 root root 19 Aug 12 10:03 /lib/libtermcap.so -> libtermcap.so.2.0.8
lrwxrwxrwx 1 root root 19 Aug 4 13:48 /lib/libtermcap.so.2 -> libtermcap.so.2.0.8
-rwxr-xr-x 1 root root 15320 Aug 12 10:03 /lib/libtermcap.so.2.0.8
I tried linking libtermcap.so.2 with libncurses.so.5, but still
doesn't work.
Linux version 2.6.7-gentoo-r11 (root@rose) (gcc version 3.4.1 (Gentoo
Linux 3.4.1, ssp-3.4-2, pie-8.7.6.3)) amd64
|
|
|
08-12-2004, 11:45 AM
|
#2
|
LQ Guru
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672
Rep:
|
use ldd to make sure the program is not looking for the library in the wrong place.
if it is looking in the wrong place, add a symbolic link to fix it.
|
|
1 members found this post helpful.
|
08-12-2004, 01:10 PM
|
#3
|
Member
Registered: Aug 2004
Distribution: gentoo, Fedora Core
Posts: 54
Original Poster
Rep:
|
ldd /bin/ch
libtermcap.so.2 => not found
libm.so.6 => /lib32/libm.so.6 (0x5557c000)
libc.so.6 => /lib32/libc.so.6 (0x5559d000)
libdl.so.2 => /lib32/libdl.so.2 (0x556b4000)
libcrypt.so.1 => /lib32/libcrypt.so.1 (0x556b8000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x55555000)
libtermcap.so.2 is in the same /lib directory as /ld-linux.so.2.
Why ld-linux.so.2 is found but not libtermcap.so.2?
Quote:
Originally posted by qwijibow
use ldd to make sure the program is not looking for the library in the wrong place.
if it is looking in the wrong place, add a symbolic link to fix it.
|
|
|
|
08-13-2004, 05:50 AM
|
#4
|
LQ Guru
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672
Rep:
|
hmm.... okay, time to go overkill....
strace -o error.log /path/to/ch
cat error.log | grep libtermcap.so.2
this will print a list of actual paths,
its notmal to see lots of attempted opens but atleast one should be in the right place.
again, if non of the atempts are in the right place, fix with a symbolic link.
as for ldconfig, i may be wrong, but i think ldconfig is only used to locate library's when you are compiling from source, im assuning you installed this program from a binary rpm or somthing similar.
|
|
1 members found this post helpful.
|
08-13-2004, 05:18 PM
|
#5
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696
|
Moved: This thread is more suitable in Linux-Software and has been moved accordingly to help your thread/question get the exposure it deserves.
|
|
|
08-13-2004, 07:05 PM
|
#6
|
Member
Registered: Aug 2004
Distribution: gentoo, Fedora Core
Posts: 54
Original Poster
Rep:
|
# strace -o error.log /bin/ch
[ Process PID=11358 runs in 32 bit mode. ]
/bin/ch: error while loading shared libraries: libtermcap.so.2: cannot open shared object file: No such file or directory
# cat error.log
execve("/bin/ch", ["/bin/ch"], [/* 41 vars */]) = 0
My linux is 64bit AMD64 gentoo.
It seems that /bin/ch is running in 32 bit mode.
How to fix this probem?
[QUOTE]Originally posted by qwijibow
[B]
strace -o error.log /path/to/ch
cat error.log | grep libtermcap.so.2
Last edited by tcma; 08-14-2004 at 11:01 AM.
|
|
|
08-14-2004, 04:38 PM
|
#7
|
LQ Guru
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672
Rep:
|
i have no experiance with 64 bit processors.
did you install this program via binary rpm or some other format ?
compile it yourself.
|
|
|
12-02-2009, 02:50 PM
|
#8
|
LQ Newbie
Registered: Aug 2008
Posts: 4
Rep:
|
Hello, I know this is an ancient thread, but it came up in a google search and I wanted to let qwijibow know that his ldd suggestion helped me big time. I have been looking for some kind of utility like that and didn't realize it was standard. Thanks!
|
|
|
02-15-2011, 03:07 AM
|
#9
|
LQ Newbie
Registered: Jan 2011
Posts: 2
Rep:
|
strace helped
Hi, I also know this is a very old thread. But just wanted to thank you for the strace command which helped in solving my issue.
In my case, the executable was checking for the library in the /usr/lib where as the private libraries were in a different path. Right now I created a link in /usr/lib to check if its working.
The path where the libraries are present is present in the LD_LIBRARY_PATH, dont know why its not taking it.
Anyways, thank you guys.
regards,
Ahamed.
|
|
1 members found this post helpful.
|
10-29-2011, 11:33 AM
|
#10
|
Member
Registered: Dec 2005
Location: France
Distribution: Debian
Posts: 123
Rep:
|
I agree with @impala454 and @ahamed101:
these two commands "ldd" and "strace" are really useful!
Thank you @qwijibow!
I did something like:
Code:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/some/lib/directory/containing/the/so/file
I re-ran the program and it worked.
Best regards,
--
Léa
Last edited by leamassiot; 10-29-2011 at 11:42 AM.
|
|
1 members found this post helpful.
|
02-23-2012, 10:56 AM
|
#11
|
LQ Newbie
Registered: Feb 2012
Posts: 1
Rep:
|
thanks!
i just signed up to say that your tips have not aged.
they have resolved my problem as well.
Thanks @leamassiot @qwijibow!
|
|
|
02-24-2012, 03:00 AM
|
#12
|
Member
Registered: Dec 2005
Location: France
Distribution: Debian
Posts: 123
Rep:
|
It's good to know @ff76 Thank you.
|
|
|
All times are GMT -5. The time now is 03:54 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|