0

I own an academic license for Gurobi. I followed the guide, but ended up with a problem. The steps I went through are:

  1. downloaded the Gurobi .tar.gz
  2. extracted it in the /opt folder with the command tar xvzf gurobi_installer.tar.gz
  3. a folder named "gurobi902" was created in the /opt folder after the extraction
  4. run the command grbgetkey xxxxx xxxxx xxxxxx xxxxxx xxxxx to activate the license
  5. wrote the following lines in the .bashrc and .profile files
export GUROBI_HOME="/opt/gurobi902/linux64"
export PATH="${PATH}:${GUROBI_HOME}/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib"
  1. opened Eclipse and edited the build path of my project and added the external jar of gurobi.jar

When I run the java program in Eclipse I get the message

java.lang.UnsatisfiedLinkError: no gurobijni90 in java.library.path

My system has:

  • Operating System: Manjaro Linux
  • KDE Plasma Version: 5.18.5
  • KDE Frameworks Version: 5.70.0
  • Qt Version: 5.15.0
  • Kernel Version: 4.19.126-1-MANJARO
  • OS Type: 64-bit

How can I solve it? Thanks in advance for the help!

devOn
  • 45
  • 1
  • 8
  • Does this answer your question? [What does "Native library location" entry do in Eclipse?](https://stackoverflow.com/questions/19768008/what-does-native-library-location-entry-do-in-eclipse) – Gimby Jun 19 '20 at 15:06
  • No, I already edited the variables in the files, but I don't know how to proceed and successfully run the code – devOn Jun 19 '20 at 15:34
  • You don't edit variables in files in Eclipse, you set project settings as per the link. – Gimby Jun 22 '20 at 07:31

2 Answers2

0

I suggest you simplify the problem by testing whether the problem involves the Eclipse configuration, or something more basic. Specifically, your Gurobi installation has an examples/build subdirectory where you can build one of the Java examples provided.

Go to that directory and do make -f Makefile Mip1 and see if that example compiles and runs successfully. If so, then you can focus on the Eclipse setup. If not, you have a simpler example with which to work.

Ed Klotz
  • 1
  • 1
0

I write what worked for me.

  1. Remove from /opt all the Gurobi installation folders
  2. Reinstall Gurobi with a new license
  3. Set the Path variables correctly, as written in the Gurobi wiki
  4. Relaunch IntelliJ with the default settings (from File -> Launch with default)
  5. (optional) specify again the Path variables in the launch configuration
  6. Run the program

If it still doesn’t work, run:

sudo ln -s /opt/gurobi951/linux64/lib/libgurobi95.so /usr/lib
sudo ln -s /opt/gurobi951/linux64/lib/libGurobiJni95.so /usr/lib
sudo ldconfig
devOn
  • 45
  • 1
  • 8