Gurobi 11.0 support

Hi, I am new to Julia, and trying to set it up in my wsl environment. I want to use julia for stochastic programming, using the package StochasticPrograms.jl to be exact.

I tried setting up Gurobi. I installed the lasted version (11.0), adjusted the env keys accordingly, but now after using Pkg.add("Gurobi), I tried using Gurobi, ran into an erorr then Pkg.build(“Gurobi”), which gives met the following error message:

julia> Pkg.build(“Gurobi”)
Building Gurobi → ~/.julia/packages/Gurobi/BAtIN/deps/build.log
┌ Error: Error building Gurobi:
│ ERROR: LoadError: Unable to locate Gurobi installation. If the advice above did not help,
│ open an issue at GitHub - jump-dev/Gurobi.jl: Julia interface for Gurobi Optimizer and post the full
│ print-out of this diagnostic attempt.

│ Stacktrace:
│ [1] error(::String) at ./error.jl:33
│ [2] top-level scope at /home/ansthesis/.julia/packages/Gurobi/BAtIN/deps/build.jl:165
│ [3] include(::String) at ./client.jl:457
│ [4] top-level scope at none:5
│ in expression starting at /home/ansthesis/.julia/packages/Gurobi/BAtIN/deps/build.jl:159

Unable to locate Gurobi installation. Running some common diagnostics.

│ Gurobi.jl only supports the following versions:

│ - gurobi91
│ - gurobi90

│ Did you download and install one of these versions from gurobi.com?
│ Installing Gurobi.jl via the Julia package manager is not sufficient!

│ Found GUROBI_HOME = /home/ansthesis/gurobi1100/linux64

│ Does this point to the correct install location?

│ We’re going to look for the Gurobi library in this directory:
│ /home/ansthesis/gurobi1100/linux64/lib

│ That directory has the following files:

│ - /home/ansthesis/gurobi1100/linux64/lib/gurobi-javadoc.jar
│ - /home/ansthesis/gurobi1100/linux64/lib/gurobi.jar
│ - /home/ansthesis/gurobi1100/linux64/lib/gurobi.py
│ - /home/ansthesis/gurobi1100/linux64/lib/gurobi110.netstandard20.dll
│ - /home/ansthesis/gurobi1100/linux64/lib/gurobi110.netstandard20.xml
│ - /home/ansthesis/gurobi1100/linux64/lib/libGurobiJni110.so
│ - /home/ansthesis/gurobi1100/linux64/lib/libgurobi.so.11.0.0
│ - /home/ansthesis/gurobi1100/linux64/lib/libgurobi110.so
│ - /home/ansthesis/gurobi1100/linux64/lib/libgurobi110_light.so
│ - /home/ansthesis/gurobi1100/linux64/lib/libgurobi_c++.a
│ - /home/ansthesis/gurobi1100/linux64/lib/libgurobi_g++8.5.a
│ - /home/ansthesis/gurobi1100/linux64/lib/python3.11
│ - /home/ansthesis/gurobi1100/linux64/lib/rootcert.pem

│ We were looking for (but could not find) a file named like
libgurobiXXX.so, libgurobiXXX.dylib, or gurobiXXX.dll.


│ You should set the GUROBI_HOME environment variable to point to the
│ install location then try again. For example (updating the path to the
│ correct location if needed):
│ # On Windows, this might be │ ENV["GUROBI_HOME"] = "C:\\Program Files\\gurobi910\\win64\\" │ import Pkg │ Pkg.add("Gurobi") │ Pkg.build("Gurobi") │ │ # On OSX, this might be │ ENV["GUROBI_HOME"] = "/Library/gurobi910/mac64/" │ import Pkg │ Pkg.add("Gurobi") │ Pkg.build("Gurobi") │ │ # On Unix, this might be │ ENV["GUROBI_HOME"] = "/opt/gurobi910/linux64/" │ import Pkg │ Pkg.add("Gurobi") │ Pkg.build("Gurobi") │
Note: your path may differ. Check which folder you installed the Gurobi
│ binary in, and update the path accordingly.

└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:949

What am I doing wrong?

I don’t have Gurobi myself but this looks significant:

I.e. it says that it only supports Gurobi 9.0 and 9.1, whereas you are trying Gorubi 11.0.

This either means that Gurobi.jl doesn’t support the latest Gurobi or that you don’t have the latest Gurobi.jl version.

You should be able to see the Gurobi.jl version from the output of Pkg.status(). What does it say?

1 Like

Hi @Petra123, welcome to the forum.

You cannot use StochasticPrograms.jl with Gurobi 11.

StochasticPrograms.jl is currently unmaintained, and needs some work to be compatible with more recent versions. See: