# Arpack.jl install error with MKL

**URL:** <https://discourse.julialang.org/t/arpack-jl-install-error-with-mkl/12254>\
**Category:** General Usage\
**Created:** [July 8, 2018, 10:28am UTC](https://discourse.julialang.org/t/arpack-jl-install-error-with-mkl/12254 "2018-07-08T10:28:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Post date:** [July 8, 2018, 10:28am UTC](https://discourse.julialang.org/t/arpack-jl-install-error-with-mkl/12254/1 "2018-07-08T10:28:19Z")

</div>

I can’t test, because Distributions doesn’t work for me on 0.7, due to this error building Arpack:

```julia
(v0.7) pkg> build Arpack
  Building Arpack → `~/.julia/packages/Arpack/OpIo/deps/build.log`
┌ Error: Error building `Arpack`: 
│ [ Info: Downloading https://github.com/JuliaLinearAlgebra/ArpackBuilder/releases/download/v3.5.0-0.2.20/ArpackBuilder.x86_64-linux-gnu.tar.gz to /home/chris/.julia/packages/Arpack/OpIo/deps/usr/downloads/ArpackBuilder.x86_64-linux-gnu.tar.gz...
│ ┌ Warning: `wait(t::Task)` is deprecated, use `fetch(t)` instead.
│ │ caller = macro expansion at OutputCollector.jl:63 [inlined]
│ └ @ Core OutputCollector.jl:63
│ ┌ Warning: `wait(t::Task)` is deprecated, use `fetch(t)` instead.
│ │ caller = wait(::OutputCollector) at OutputCollector.jl:160
│ └ @ BinaryProvider OutputCollector.jl:160
│ ┌ Warning: `wait(t::Task)` is deprecated, use `fetch(t)` instead.
│ │ caller = wait(::OutputCollector) at OutputCollector.jl:161
│ └ @ BinaryProvider OutputCollector.jl:161
│ ┌ Warning: `wait(t::Task)` is deprecated, use `fetch(t)` instead.
│ │ caller = wait(::OutputCollector) at OutputCollector.jl:165
│ └ @ BinaryProvider OutputCollector.jl:165
│ ERROR: LoadError: LibraryProduct(nothing, ["libarpack"], :libarpack, "Prefix(/home/chris/.julia/packages/Arpack/OpIo/deps/usr)") is not satisfied, cannot generate deps.jl!
│ Stacktrace:
│ [1] error at ./error.jl:33 [inlined]
│ [2] #write_deps_file#134(::Bool, ::Function, ::String, ::Array{LibraryProduct,1}) at /home/chris/.julia/packages/BinaryProvider/mWAR/src/Products.jl:392
│ [3] write_deps_file(::String, ::Array{LibraryProduct,1}) at /home/chris/.julia/packages/BinaryProvider/mWAR/src/Products.jl:379
│ [4] top-level scope at none:0
│ [5] include at ./boot.jl:317 [inlined]
│ [6] include_relative(::Module, ::String) at ./loading.jl:1034
│ [7] include(::Module, ::String) at ./sysimg.jl:29
│ [8] include(::String) at ./client.jl:393
│ [9] top-level scope at none:0
│ in expression starting at /home/chris/.julia/packages/Arpack/OpIo/deps/build.jl:40
[05:21:09] ######################################################################## 100.0%
└ @ Pkg.Operations Operations.jl:993

```

The error says

```julia
ERROR: LoadError: LibraryProduct(nothing, ["libarpack"], :libarpack, "Prefix(/home/chris/.julia/packages/Arpack/OpIo/deps/usr)") is not satisfied, cannot generate deps.jl!

```

Checking, I do have `libarpack.so` in `/home/chris/.julia/packages/Arpack/OpIo/deps/usr/lib`.

EDIT:

```julia
julia> satisfied(products[1], verbose = true)
[ Info: Found a valid dl path libarpack.so while looking for libarpack
[ Info: /home/chris/.julia/packages/Arpack/OpIo/deps/usr/lib/libarpack.so matches our search criteria of libarpack
[ Info: /home/chris/.julia/packages/Arpack/OpIo/deps/usr/lib/libarpack.so cannot be dlopen'ed
[ Info: Found a valid dl path libarpack.so.2 while looking for libarpack
[ Info: /home/chris/.julia/packages/Arpack/OpIo/deps/usr/lib/libarpack.so.2 matches our search criteria of libarpack
[ Info: /home/chris/.julia/packages/Arpack/OpIo/deps/usr/lib/libarpack.so.2 cannot be dlopen'ed
[ Info: Found a valid dl path libarpack.so.2.0.0 while looking for libarpack
[ Info: /home/chris/.julia/packages/Arpack/OpIo/deps/usr/lib/libarpack.so.2.0.0 matches our search criteria of libarpack
[ Info: /home/chris/.julia/packages/Arpack/OpIo/deps/usr/lib/libarpack.so.2.0.0 cannot be dlopen'ed
[ Info: Could not locate libarpack inside /home/chris/.julia/packages/Arpack/OpIo/deps/usr/lib
false

```

Okay, so `satisfied` did find the files, but could not open them.

```julia
julia> using Libdl

julia> libarpack = Libdl.dlopen("usr/lib/libarpack.so")
ERROR: could not load library "usr/lib/libarpack.so"
libgfortran.so.4: cannot open shared object file: No such file or directory
Stacktrace:
 [1] dlopen(::String, ::UInt32) at /home/chris/Documents/prog/julia-reg/usr/share/julia/stdlib/v0.7/Libdl/src/Libdl.jl:99 (repeats 2 times)
 [2] top-level scope at none:0

```

Apparently I am missing `libgfortran.so.4`. Starting with gcc-8, it is now `libgfortran.so.5`. This is the default on popular distributions like Arch and Fedora.  
EDIT:  
And when Julia is built with MKL:

```julia
ERROR: could not load library "lib/libarpack.so"
libopenblas64_.so.0: cannot open shared object file: No such file or directory

```

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [July 9, 2018, 7:39am UTC](https://discourse.julialang.org/t/arpack-jl-install-error-with-mkl/12254/2 "2018-07-09T07:39:52Z")

</div>

I think this is [Libraries cannot load · Issue #2 · JuliaLinearAlgebra/OpenBLASBuilder · GitHub](https://github.com/JuliaLinearAlgebra/OpenBLASBuilder/issues/2).

---

<div class="post-metadata">

**Author:** ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Post date:** [July 9, 2018, 8:18am UTC](https://discourse.julialang.org/t/arpack-jl-install-error-with-mkl/12254/3 "2018-07-09T08:18:17Z")

</div>

Unfortunately, the only solutions at the moment seem to be either “use a prebuilt Julia binary” or “rebuild OpenBLAS with gfortran-7”?  
Lots of Linux distributions, such as Arch and Fedora, have already moved on to gfortran-8. So I imagine this problem will be fairly common.  
That solution also precludes using MKL.

Would be nice if there were an easy option to support just building it yourself.  
When I need Arpack, or something dependent on it, I’ll try that and sticking a symlink in the correct place.

---

<div class="post-metadata">

**Author:** ![dmbates](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmbates/32/44_2.png) [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Post date:** [July 9, 2018, 5:41pm UTC](https://discourse.julialang.org/t/arpack-jl-install-error-with-mkl/12254/4 "2018-07-09T17:41:04Z")

</div>

We may want to revisit the dependence of `PDMats` on `Arpack`, which is how `Distributions` ends up depending on `Arpack`. `Arpack` code is used only for a corner case in `PDMats` which then ends up precluding the simultaneous use of `Distributions` and `MKL`. That’s a big price to pay for such a corner case.

---

<div class="post-metadata">

**Author:** ![anon94023334](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@anon94023334](https://discourse.julialang.org/u/anon94023334)\
**Post date:** [July 11, 2018, 7:13pm UTC](https://discourse.julialang.org/t/arpack-jl-install-error-with-mkl/12254/5 "2018-07-11T19:13:59Z")

</div>

We’re considering the same thing for `LightGraphs` - we use it for `eigs` in only 3 or 4 places.

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [November 12, 2018, 1:43pm UTC](https://discourse.julialang.org/t/arpack-jl-install-error-with-mkl/12254/6 "2018-11-12T13:43:34Z")

</div>

> [@dmbates](#):
>
> We may want to revisit the dependence of `PDMats` on `Arpack`, which is how `Distributions` ends up depending on `Arpack`. `Arpack` code is used only for a corner case in `PDMats` which then ends up precluding the simultaneous use of `Distributions` and `MKL`. That’s a big price to pay for such a corner case.

Any update on this? I can’t run my code with Julia+MKL because of this dependency.

---

<div class="post-metadata">

**Author:** ![dmbates](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmbates/32/44_2.png) [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Post date:** [November 12, 2018, 3:54pm UTC](https://discourse.julialang.org/t/arpack-jl-install-error-with-mkl/12254/7 "2018-11-12T15:54:24Z")

</div>

Sorry to say that I don’t know of any updates on this.

---

<div class="post-metadata">

**Author:** ![Yifan\_Liu](https://avatars.discourse-cdn.com/v4/letter/y/4da419/32.png) [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Post date:** [November 12, 2018, 8:18pm UTC](https://discourse.julialang.org/t/arpack-jl-install-error-with-mkl/12254/8 "2018-11-12T20:18:00Z")

</div>

I have the same issue on Fedora 27.

---

<div class="post-metadata">

**Author:** ![juthohaegeman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juthohaegeman/32/8620_2.png) [@juthohaegeman](https://discourse.julialang.org/u/juthohaegeman)\
**Post date:** [November 12, 2018, 9:25pm UTC](https://discourse.julialang.org/t/arpack-jl-install-error-with-mkl/12254/9 "2018-11-12T21:25:21Z")

</div>

Is Arpack really needed? There are some native Julia alternatives by now.

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [November 13, 2018, 8:36am UTC](https://discourse.julialang.org/t/arpack-jl-install-error-with-mkl/12254/10 "2018-11-13T08:36:29Z")

</div>

> **[GitHub - JuliaLinearAlgebra/ArnoldiMethod.jl: Implicitly Restarted Arnoldi...](https://github.com/JuliaLinearAlgebra/ArnoldiMethod.jl)**
>
> Implicitly Restarted Arnoldi Method, natively in Julia - GitHub - JuliaLinearAlgebra/ArnoldiMethod.jl: Implicitly Restarted Arnoldi Method, natively in Julia

Maybe this could be a substitute.
