我正在尝试在Ubuntu 14.04的学术许可下安装Gurobi。我已阅读以下有关UnsatisfiedLinkError
:stackoverflow.com/questions/...的帖子。但这对我没有帮助。我已在opt
文件夹中解压缩了该zip文件。我已将许可证文件放在/opt/gurobi600/linux64/lib/gurobi.lic
中。
我正在尝试在Eclipse中运行Callback.java
示例。
我有Java VM参数:-Djava.library.path=/opt/gurobi600/linux64/lib/
。我有程序参数:/opt/gurobi600/linux64/examples/data/qafiro.lp
。环境变量LD_LIBRARY_PATH
设置在/opt/gurobi600/linux64/lib/gurobi.lic
我得到以下stacktrace:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/gurobi600/linux64/lib/libGurobiJni60.so: libgurobi60.so: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1880)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at gurobi.GurobiJni.<clinit>(GurobiJni.java:197)
at gurobi.GRBEnv.<init>(GRBEnv.java:16)
at gurobi.GRBEnv.<init>(GRBEnv.java:11)
at main.Callback.main(Callback.java:135)
有什么想法吗?
答案 0 :(得分:3)
现在一切正常。我已经在运行配置菜单中删除了VM参数,因此Eclipse中的所有参数都是空的。我在Eclipse中更改了环境变量,它们现在设置为:
GUROBI_HOME = /opt/gurobi600/linux64/
GRB_LICENSE_FILE = /opt/gurobi600/linux64/gurobi.lic
LD_LIBRARY_PATH = /opt/gurobi600/linux64/lib/
PATH = /opt/gurobi600/linux64/bin/