Problem with Gurobi java API: libgurobi95.so: cannot open shared object file: No such file or directory
AnsweredHello,
I am trying to use the Gurobi java API for the first time and I am trying to run the MIP1 example here: https://www.gurobi.com/documentation/9.1/examples/mip1_java.html
I am using IntelliJ IDEA on Linux Ubuntu machine. I imported gurobi module to IntelliJ and the program build was done without errors. But when I try to run it, I get the following error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/ramy/gurobi950/linux64/lib/libGurobiJni95.so: libgurobi95.so: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1850)
at java.lang.Runtime.loadLibrary0(Runtime.java:871)
at java.lang.System.loadLibrary(System.java:1124)
at gurobi.GurobiJni.<clinit>(GurobiJni.java:304)
at gurobi.GRBEnv.<init>(GRBEnv.java:107)
at com.example.java.Main.main(Main.java:20)
Process finished with exit code 1
I would be very grateful to get your help in this regards
Regards
Ramy
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
This question is also handled on StackOverflow: linux - Problem with Gurobi java API: libgurobi95.so: cannot open shared object file: No such file or directory - Stack Overflow
summary: It's most likely an issue with the Java compiler environment not loading the runtime library specified in the environment variable LD_LIBRARY_PATH.
- Matthias
0
Post is closed for comments.
Comments
2 comments