Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Issues #387

Closed
hemoring opened this issue Jan 6, 2021 · 5 comments
Closed

Installation Issues #387

hemoring opened this issue Jan 6, 2021 · 5 comments

Comments

@hemoring
Copy link

hemoring commented Jan 6, 2021

I have tried installing Gurobi to use with Julia on ATOM/Juno several times and I cannot get it to work. I get this error message and it tells me to post it here so hopefully someone can help. I'm very new to this, the only coding experience I have really is with Matlab.

 Error: Error building `Gurobi`: 
│ ERROR: LoadError: Unable to locate Gurobi installation. If the advice above did not help,
│ open an issue at 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 C:\Users\hanna\.julia\packages\Gurobi\NE6Ff\deps\build.jl:161
│  [3] include(::String) at .\client.jl:457
│  [4] top-level scope at none:5
│ in expression starting at C:\Users\hanna\.julia\packages\Gurobi\NE6Ff\deps\build.jl:155
│ 
│ **Unable to locate Gurobi installation. Running some common diagnostics.**
│ 
│ Gurobi.jl only supports the following versions:
│ 
│  - gurobi90
│  - gurobi91
│ 
│ 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 =  C:\Program Files\gurobi911\win64
│ 
│ Does this point to the correct install location?
│ 
│ We're going to look for the Gurobi library in this directory:
│     C:\Program Files\gurobi911\win64\bin
│ 
│ That directory has the following files:
│ 
│  - C:\Program Files\gurobi911\win64\bin\Gurobi91.NET.XML
│  - C:\Program Files\gurobi911\win64\bin\Gurobi91.NET.dll
│  - C:\Program Files\gurobi911\win64\bin\GurobiJni91.dll
│  - C:\Program Files\gurobi911\win64\bin\grb_ts.exe
│  - C:\Program Files\gurobi911\win64\bin\grbcluster.exe
│  - C:\Program Files\gurobi911\win64\bin\grbgetkey.exe
│  - C:\Program Files\gurobi911\win64\bin\grbprobe.exe
│  - C:\Program Files\gurobi911\win64\bin\grbtune.exe
│  - C:\Program Files\gurobi911\win64\bin\gurobi.bat
│  - C:\Program Files\gurobi911\win64\bin\gurobi91.dll
│  - C:\Program Files\gurobi911\win64\bin\gurobi91_light.dll
│  - C:\Program Files\gurobi911\win64\bin\gurobi_cl.exe
│  - C:\Program Files\gurobi911\win64\bin\vslauncher.exe
│  - C:\Program Files\gurobi911\win64\bin\vswhere.exe
│ 
│ 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.**
@odow
Copy link
Member

odow commented Jan 6, 2021

That's weird. It certainly looks like it should have worked. What's the output of

using Libdl
Libdl.dlopen("C:\\Program Files\\gurobi911\\win64\\bin\\gurobi91.dll")

@odow
Copy link
Member

odow commented Jan 6, 2021

It looks like you have 32-bit Julia installed. You need to install the 64-bit version: https://julialang.org/downloads/

@hemoring
Copy link
Author

hemoring commented Jan 6, 2021

That's weird. It certainly looks like it should have worked. What's the output of

using Libdl
Libdl.dlopen("C:\\Program Files\\gurobi911\\win64\\bin\\gurobi91.dll")

julia> Libdl.dlopen("C:\Program Files\gurobi911\win64\bin\gurobi91.dll")
ERROR: could not load library "C:\Program Files\gurobi911\win64\bin\gurobi91.dll"
%1 is not a valid Win32 application.
Stacktrace:
[1] dlopen(::String, ::UInt32; throw_error::Bool) at C:\buildbot\worker\package_win32\build\usr\share\julia\stdlib\v1.5\Libdl\src\Libdl.jl:109
[2] dlopen at C:\buildbot\worker\package_win32\build\usr\share\julia\stdlib\v1.5\Libdl\src\Libdl.jl:109 [inlined] (repeats 2 times)
[3] top-level scope at none:1

@hemoring
Copy link
Author

hemoring commented Jan 6, 2021

It looks like you have 32-bit Julia installed. You need to install the 64-bit version: https://julialang.org/downloads/

It looks like you have 32-bit Julia installed. You need to install the 64-bit version: https://julialang.org/downloads/

thank you!

@odow odow closed this as completed Jan 6, 2021
@odow
Copy link
Member

odow commented Jan 6, 2021

thank you!

No problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants