error while loading shared libraries
Hi, all,
I was trying to run a c++ program. Because I don't have root permission to install Boost C++ library, I installed it under my home local directory: /home/username/boost. The boost version I installed is boost_1_49_0. There is a .bashrc file under /home/username/ directory, I made the following settings to this .bashrc file: export LD_LIBRARY_PATH=/home/username/boost/lib:$LD_LIBRARY_PATH export LIBRARY_PATH=/home/username/boost/lib:$LIBRARY_PATH export C_INCLUDE_PATH=/home/username/boost/include:$C_INCLUDE_PATH export CPLUS_INCLUDE_PATH=/home/username/boost/include:$CPLUS_INCLUDE_PATH There was a makefile, so when compiling, I used: make -l/home/username/boost/lib but there is an error when run the main: error while loading shared libraries: libboost_program_options.so.1.42.0: cannot open shared object file: No such file or directory I also tried to run: export LD_LIBRARY_PATH=/home/username/boost/stage/lib, but it didn't work. I am quite a newbie, does anyone can help me? Thanks a lot. |
Hi,
I don't know what you have in make file.Give a snap of your make file to be more clear of the question. try this: In make file use -L(capital) in place of -l(small) to give the linker ,where to search for the libraries during runtime. examle: gcc -L/home/username/boost/lib <cpp file> Thanks |
You said that it's looking for libboost_program_options.so.1.42.0. Is this the exact library-version that is installed in the local directory?
Your program's request for the library is apparently as specific as a request can be: "version 1.42.0, please." No other version will satisfy such a request. |
perhaps creating a symbolic link with the desired name of the library to the one you actually have in your system could wrap it up without breaking a lot of stuff.
|
All times are GMT -5. The time now is 06:44 AM. |