coin-or / SHOT

A solver for mixed-integer nonlinear optimization problems
https://shotsolver.dev
Eclipse Public License 2.0
117 stars 25 forks source link

"error while loading shared libraries: libSHOTSolver.so" #157

Closed chemrgineer closed 2 years ago

chemrgineer commented 2 years ago

Hi, I'm compiling SHOT with IPOPT and CPLEX without any error. In build folder "SHOT" executable working wihtout any problem. Then I run sudo make install then try to run SHOT and gives: "SHOT: error while loading shared libraries: libSHOTSolver.so: cannot open shared object file: No such file or directory". I copied SHOT, libSHOTSolver.so files another folder and try to run its working but when I add to PATH that folder and try to run another directory its not working. I think there is a linking problem. Thank you for helps.

andreaslundell commented 2 years ago

Did you pass the parameter -DCMAKE_INSTALL_PREFIX=/opt/SHOT to CMake? This will install the SHOT executable to /opt/SHOT/bin/ and the shared library to /opt/SHOT/lib/ when running make install.

In addition to adding /opt/SHOT/bin to your path, you will probably also need to set the environmental variable LD_LIBRARY_PATH to /opt/SHOT/lib for your system to find the shared library.