0

In my Gurobi C++ program i try to make the executable portable with other machines without Gurobi installed.

When i move the executable to another machine the error message is the following:

dyld: Library not loaded: libgurobi60.so
 Referenced from: <executable_folder>
 Reason: image not found
Trace/BPT trap: 5

I found the libgurobi60.so and libgurobi_c++.a in the lib folder inside the Gurobi folder

Is that because a copyright situation or something else?

Compiled in Mac OS 10.10, Gurobi 6.0.0

keyser
  • 18,829
  • 16
  • 59
  • 101
urco
  • 189
  • 1
  • 5
  • 16

2 Answers2

1

Your project appears to rely on a shared object file called libgurobi60.so that is inaccessible once the executable is moved.

Make sure that the .so file is moved with the executable. If the .so file is being kept with the executable and you still see this error, then the executable is searching for the .so in the wrong location.

Community
  • 1
  • 1
Conduit
  • 2,675
  • 1
  • 26
  • 39
  • i try copy the folder structure of the Gurobi folder and move it to another machine with the same result. Curiously now i'm able to compile with the Gurobi libraries but i'm still not able to execute the very program that i just compile – urco Feb 03 '15 at 22:27
1

To run an executable linked with Gurobi you need

  1. Have a Gurobi license file that works with your machine (unless you are using the compute server
  2. Set the variable GRB_LICENSE_FILE unless the file is in a default location
  3. Have the shared library libgurobixx in a standard location, or in a directory specified by the environment variables LD_LIBRARY_PATH, or DYLD_LIBRARY_PATH
Loring
  • 323
  • 2
  • 12
David Nehme
  • 21,379
  • 8
  • 78
  • 117