LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-07-2009, 11:26 PM   #1
venky.kv
LQ Newbie
 
Registered: Aug 2005
Posts: 2

Rep: Reputation: 0
library missing:No such file or directory error(all files and paths are set properly


Hi everyone, i am new to linux. i have an old system which has red hat installed in it. i have some c files,some libraries and binaries that have been generated from a make file which links those libraries and complies the c file. i am able to run the binary quite well( ./filename).

I backed up the binary file and ran the makefile again which generated a new binary(executable) file. It got successfully compiled without any errors. now when i am trying to run the program, i am getting an error as library is missing ( no such file or directory). Both the executables(new one and backed-up one) came from the same source. The old executable is running fine but the new one is unable to link the libraries.

i thought that the make file couldnt link the libraries properly , so first i gave wrong path and tried to compile and it gave library linking error, so i un-did all the changes and ran the make file again, but still the executable is giving same error.

i tried everything ( setting library path using LD_LIBRARY_PATH, setting the permission of libraries to read/write etc) but still no use. I am clueless about why the old executable is running fine and new one generated from same source code is giving an error.

please kindly help me out.


Thanks in advance.
 
Old 03-08-2009, 03:12 AM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

1. You can run "ldd EXENAME" to find what libraries are needed (including the one(s) you might know about from the error message

2. It's entirely possible to build a program (with shared dependencies) and not be able to run it (if the runtime dependencies aren't actually available).

3. It's also entirely possible to build the same program (from source) such that it has *different* dependencies (for example, if you build on different machines, with different libraries; or if you build with different link switches). There are many other scenarios - you didn't give enough information to be certain of the exact cause.

In any case, your best bet is to try installing any missing dependencies (after making sure your build and target machines are as close as possible to exactly the same versions of all libraries).

'Hope that helps .. pSM
 
Old 03-08-2009, 11:59 PM   #3
venky.kv
LQ Newbie
 
Registered: Aug 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Hi pSM,
Thanks for the reply.


--I am getting the following error:
./test1:error while loading shared libraries : liblagr.so: cannot open shared object file: No such file or directory

-- ran the command lld test1 and i got following error.

linux-gate.so.1 => (0xffffe000)
liblagr.so => not found
libtriclops.so => not found
libpthread.so.0 => /lib/libpthread.so.0 (0xb7ec5000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7de5000)
libm.so.6 => /lib/libm.so.6 (0xb7dbf000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7db4000)
libc.so.6 => /lib/libc.so.6 (0xb7c94000)
/lib/ld-linux.so.2 (0xb7eeb000)

-- the make fil has the following lines in it.

LDFLAGS = \
-L. \
-L../../lib \


-- and the file liblagr.so is present there only
my .c file is located at /home/venky/examples/trials/test1.c
and the libraries are located at /home/venky/lib/

when i am trying to find liblagr.so using locate command i am getting the following error:
locate: warning: database `/var/lib/locatedb' is more than 8 days old


is this anything to do with the problem??


Thanks once again.
 
Old 03-09-2009, 10:49 AM   #4
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

1. You seem to be missing both libtriclops and liblagr.

2. The easiest way to find them is:
Quote:
find / -name "*triclops*" -print 2>/dev/ null

find / -name "*lagr*" -print 2>/dev/ null
3. Another way is to refer back to the original source you're trying to build (README, BUILD, etc: whatever files look interesting) and see where [i]they[i/] suggest downloading "libtriclops" and "liblagr" from

4. You might also be able to install an RPM for one or both of these packages.

PS:
My guess is you're trying to build/simulate a robot, and the "Triclops" in question is Point Grey's Stereo Vision:

http://www.ptgrey.com/products/triclopsSDK/index.asp

If so, your best bet is to go back to the original source you started with, and search for "README" files in that, or post questions to the original authors.

Last edited by paulsm4; 03-09-2009 at 10:58 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
apt-get dpkg error: files list file ... missing final newline PBSchmidt Debian 9 12-11-2012 05:14 AM
PHP include file directory/paths DMeerholz Linux - Software 1 07-02-2007 10:21 AM
Error creating library file from object files using xlc montylee AIX 2 04-07-2005 07:44 AM
Getting erro - Library files for "libkcm_k3bsetup2.la" not found in paths error. rsreeni Linux - Newbie 0 08-22-2004 07:07 PM
kde 3.1 compiling error, missing file or directory johnva Linux - Software 7 07-03-2003 04:07 PM


All times are GMT -5. The time now is 12:19 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration