古罗比(Gurobi)UnsatisfiedLinkError [英] Gurobi UnsatisfiedLinkError

查看:71
本文介绍了古罗比(Gurobi)UnsatisfiedLinkError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试根据Ubuntu 14.04上的学术许可证安装Gurobi.我已阅读有关 UnsatisfiedLinkError 的以下帖子:

I am trying to install Gurobi under Academic Licence on Ubuntu 14.04. I have read the following post about the UnsatisfiedLinkError: stackoverflow.com/questions/.... But that didnt help me. I have extracted the zip in my opt folder. I have placed the licence file in /opt/gurobi600/linux64/lib/gurobi.lic.

我正在尝试在Eclipse中运行 Callback.java 示例.

I am trying to run the Callback.java example in Eclipse.

我有一个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

I have as Java VM argument: -Djava.library.path=/opt/gurobi600/linux64/lib/. I have as program argument: /opt/gurobi600/linux64/examples/data/qafiro.lp. The environment variable LD_LIBRARY_PATH is set on /opt/gurobi600/linux64/lib/gurobi.lic

我得到以下堆栈跟踪:

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)

有什么想法吗?

推荐答案

现在一切正常.我在运行配置菜单中删除了VM参数,因此在Eclipse中全部为空.我已经在Eclipse中更改了环境变量,现在将它们设置为:

It's all working properly now. I have removed the VM arguments in the run configurations menu, so that's all empty in Eclipse. I have changed the environment variables in Eclipse, they are now set to:

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/

这篇关于古罗比(Gurobi)UnsatisfiedLinkError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆