Gurobi- failed to precompile

Hello,

I have problem with gurobi, i am using MacBook Pro and suddenly it show me error that it failed to precompile, i have tried to remove it and add it again but it doesn’t work. my license is valid and i am using Gurobi Optimizer version v.0.8.0
Below is the error

┌ Error: Error building Gurobi:
│ Gurobi Optimizer version 9.0.2 build v9.0.2rc0 (mac64)
│ Copyright © 2020, Gurobi Optimization, LLC
│ ERROR: LoadError: Unable to locate Gurobi installation. If the advice above did not help,
│ open an issue at https://github.com/JuliaOpt/Gurobi.jl and post the full
│ print-out of this diagnostic attempt.

│ Stacktrace:
│ [1] error(::String) at /Applications/JuliaPro-1.4.0-1.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
│ [2] top-level scope at /Users/Moh/.juliapro/JuliaPro_v1.4.0-1/packages/Gurobi/7YNJV/deps/build.jl:154
│ [3] include(::String) at /Applications/JuliaPro-1.4.0-1.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
│ [4] top-level scope at none:5
│ [5] eval(::Module, ::Any) at /Applications/JuliaPro-1.4.0-1.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
│ [6] exec_options(::Base.JLOptions) at /Applications/JuliaPro-1.4.0-1.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
│ [7] _start() at /Applications/JuliaPro-1.4.0-1.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
│ in expression starting at /Users/Moh/.juliapro/JuliaPro_v1.4.0-1/packages/Gurobi/7YNJV/deps/build.jl:152
│ Unable to locate Gurobi installation. Running some common diagnostics.

│ Gurobi.jl only supports the following versions:

│ - gurobi90
│ - gurobi81
│ - gurobi80
│ - gurobi75
│ - gurobi70

│ Did you download and install one of these versions from gurobi.com?


│ Looking for a version of Gurobi in your path:


│ We couldn’t find the GUROBI_HOME environment variable, but we
│ found this version of Gurobi on your path. Is this version one of
│ the supported versions listed above? If not, you should edit your
PATH to point to the correct version.
└ @ Pkg.Operations /Users/vagrant/worker/juliapro-release-osx1011-0_6/build/tmp_julia/Julia-1.4.app/Contents/Resources/julia/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:892
[ Info: Precompiling Gurobi [2e9cd046-0924-5485-92f1-d5272153d98b]
ERROR: LoadError: Gurobi not properly installed. Please run Pkg.build(“Gurobi”). For
more information go to https://github.com/JuliaOpt/Gurobi.jl

This is weird. It managed to find Gurobi 9.0.2 on your path, but not the dylib.

Try (assuming this is where you installed Gurobi)

julia> ENV["GUROBI_HOME"] = "/Library/gurobi902/mac64"

julia> import Pkg; Pkg.build("Gurobi")
1 Like

Yah i have tried everything it shows me this error Unable to locate Gurobi installation. It was working fine but suddenly this issue appear

Did you try the GUROBI_HOME thing? What is the output of the error message?

For the ENV[“GUROBI_HOME”] = “/Library/gurobi902/mac64” the output is the same there is no error but when i run gurobi it show me the below error

[ Info: Precompiling Gurobi [2e9cd046-0924-5485-92f1-d5272153d98b]
ERROR: LoadError: Gurobi not properly installed. Please run Pkg.build(“Gurobi”). For
more information go to https://github.com/JuliaOpt/Gurobi.jl

Stacktrace:
[1] error(::String) at /Applications/JuliaPro-1.4.0-1.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
[2] top-level scope at /Users/mohammedbushlaibi/.juliapro/JuliaPro_v1.4.0-1/packages/Gurobi/7YNJV/src/Gurobi.jl:7
[3] include(::Module, ::String) at /Applications/JuliaPro-1.4.0-1.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
[4] top-level scope at none:2
[5] eval at ./boot.jl:331 [inlined]
in expression starting at /Users/mohammedbushlaibi/.juliapro/JuliaPro_v1.4.0-1/packages/Gurobi/7YNJV/src/Gurobi.jl:4

How did you solve this error?