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. |
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 |
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. |
Hi -
1. You seem to be missing both libtriclops and liblagr. 2. The easiest way to find them is: Quote:
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. |
All times are GMT -5. The time now is 12:29 PM. |