Reputation: 980
I am using a program called dawg which depends on boost library. I need to run the program on the cluster where I do not have root access. While trying to run the program it returns error as :
/home/masih/Baterial_simulator/dawg_new/my_build/bin/dawg: error while loading shared libraries: libboost_program_options.so.1.65.1: cannot open shared object file: No such file or directory
I installed the boost 1.65.1 package manually and have put it in the '.bashrc' file as following:
#export LD_LIBRARY_PATH="/home/masih/Baterial_simulator/boost_1_65_1/lib/lib:$LD_LIBRARY_PATH"
the file ' libboost_program_options.so.1.65.1' exist in the ' /home/masih/Baterial_simulator/boost_1_65_1/lib/lib ' but still I get the error.
I have also tried to include the boost package information while configuring the package by putting the following lines in the 'CMakeLists.txt'
SET (BOOST_ROOT "/home/masih/Baterial_simulator/boost_1_65_1/lib")
SET (BOOST_INCLUDEDIR "/home/masih/Baterial_simulator/boost_1_65_1/lib/include")
SET (BOOST_LIBRARYDIR "/home/masih/Baterial_simulator/boost_1_65_1/lib/lib")
The installation completes without any error but trying to run the program returns the same error again. The cluster is using RedHat OS.
Upvotes: 2
Views: 4995
Reputation: 408
Give the path of directory where your program is running.
For Example:
Below line will direct library-path to your current/program directory.
if already set then use : unset LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/masih/Baterial_simulator/dawg_new/my_build/bin/dawg:$LD_LIBRARY_PATH
Note: This command only work when libboost_program_options.so.1.65.1 is installed in system lib path.
If not working then direct your library path to path of your running program.
export LD_LIBRARY_PATH=/home/masih/Baterial_simulator/boost_1_65_1/lib/lib:/home/masih/Baterial_simulator/dawg_new/my_build/bin/dawg
Upvotes: 3