Error when installing solvers for JuMP

When I try to install one of the commonly used solvers like Cbc, Cpl or GLPK, I’d get the error message: dependencies errored. To see a full report either run import Pkg; Pkg.precompile() or load the packages. And when I try to load them in the REPL, I’d run into LoadError on all of them, with the library providing the interface to each underlying solver not being defined, for example with GLPK:

julia> using GLPK
[ Info: Precompiling GLPK [60bf3e95-4087-53dc-ae20-288a0d20c6a6]
WARNING: could not import GLPK_jll.libglpk into GLPK
ERROR: LoadError: UndefVarError: libglpk not defined
Stacktrace:
 [1] glp_version()
   @ GLPK ~/.julia/packages/GLPK/JpN1q/src/gen/libglpk_api.jl:678
# more stacktrace below

Similarly for:

  • Clp - ERROR: LoadError: UndefVarError: libClp not defined
  • Cbc - ERROR: LoadError: UndefVarError: libcbcsolver not defined

I’m using julia version 1.7.0-rc1, on M1 Macbook Air, so originally I thought maybe it had something to do with the solvers being not supported on Apple silicon yet. But I checking their Homebrew formulae, all 3 are supported on Apple silicon for Big Sur, which is the macOS version I’m on too.

So any ideas for why I’m running into these installation issues?

We haven’t built any of the solvers for M1 yet. We don’t use homebrew.

1 Like

Okay thanks, so the CPU architecture is likely the problem then?

I have the same issue with my M1 mini. I finally use the COSMO solver .

1 Like

COSMO doesn’t work for integer linear programming. I ended up getting Cbc.jl to work using their custom install instructions as suggested here: Error when compiling linear integer programming problem - #3 by odow

1 Like