# Gurobi 11.0 support

**URL:** <https://discourse.julialang.org/t/gurobi-11-0-support/108667>\
**Category:** Optimization (Mathematical)\
**Tags:** math, gurobi\
**Created:** [January 11, 2024, 10:08am UTC](https://discourse.julialang.org/t/gurobi-11-0-support/108667 "2024-01-11T10:08:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Petra123](https://avatars.discourse-cdn.com/v4/letter/p/a587f6/32.png) [@Petra123](https://discourse.julialang.org/u/Petra123)\
**Post date:** [January 11, 2024, 10:08am UTC](https://discourse.julialang.org/t/gurobi-11-0-support/108667/1 "2024-01-11T10:08:44Z")

</div>

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](https://github.com/jump-dev/Gurobi.jl) 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](http://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?

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [January 11, 2024, 11:12am UTC](https://discourse.julialang.org/t/gurobi-11-0-support/108667/2 "2024-01-11T11:12:02Z")

</div>

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

> [@Petra123](#):
>
> │ [Gurobi.jl](https://juliahub.com/ui/Packages/Gurobi) only supports the following versions:  
> │  
> │ - gurobi91  
> │ - gurobi90

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?

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [January 12, 2024, 3:31am UTC](https://discourse.julialang.org/t/gurobi-11-0-support/108667/3 "2024-01-12T03:31:34Z")

</div>

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:

- [Maintenance of repo · Issue #51 · martinbiel/StochasticPrograms.jl · GitHub](https://github.com/martinbiel/StochasticPrograms.jl/issues/51)
- [Installing StochasticPrograms.jl downgrades CPLEX.jl · Issue #49 · martinbiel/StochasticPrograms.jl · GitHub](https://github.com/martinbiel/StochasticPrograms.jl/issues/49)
