# Distributions and Arpack fail to build

**URL:** <https://discourse.julialang.org/t/distributions-and-arpack-fail-to-build/16437>\
**Category:** General Usage\
**Created:** [October 17, 2018, 11:44am UTC](https://discourse.julialang.org/t/distributions-and-arpack-fail-to-build/16437 "2018-10-17T11:44:23Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Post date:** [October 17, 2018, 11:44am UTC](https://discourse.julialang.org/t/distributions-and-arpack-fail-to-build/16437/1 "2018-10-17T11:44:23Z")

</div>

After updating my packages, I encountered a problem building/precompiling distributions and arpack. The issue seems to be Arpack. Does anyone know how to fix this?

Thanks

OS: Mac 10.11.6  
Julia 1.0

````julia
julia> using Distributions
[Info: Precompiling Distributions [31c24e10-a181-5473-b8eb-7969acd0382f]
ERROR: LoadError: No deps.jl file could be found. Please try running Pkg.build("Arpack").
Currently, the build command might fail when Julia has been built from source
and the recommendation is to use the official binaries from julialang.org.
For more info see https://github.com/JuliaLinearAlgebra/Arpack.jl/issues/5.

Stacktrace:
 [1] top-level scope at /Users/christopher.fisher/.julia/packages/Arpack/UiiMc/src/Arpack.jl:19
 [2] include at ./boot.jl:317 [inlined]
 [3] include_relative(::Module, ::String) at ./loading.jl:1038
 [4] include(::Module, ::String) at ./sysimg.jl:29
 [5] top-level scope at none:2
 [6] eval at ./boot.jl:319 [inlined]
 [7] eval(::Expr) at ./client.jl:389
 [8] top-level scope at ./none:3
in expression starting at /Users/christopher.fisher/.julia/packages/Arpack/UiiMc/src/Arpack.jl:16
ERROR: LoadError: LoadError: Failed to precompile Arpack [7d9fca2a-8960-54d3-9f78-7d1dccf2cb97] to /Users/christopher.fisher/.julia/compiled/v1.0/Arpack/X5VZL.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] macro expansion at ./logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1184
 [4] _require(::Base.PkgId) at ./logging.jl:311
 [5] require(::Base.PkgId) at ./loading.jl:852
 [6] macro expansion at ./logging.jl:311 [inlined]
 [7] require(::Module, ::Symbol) at ./loading.jl:834
 [8] include at ./boot.jl:317 [inlined]
 [9] include_relative(::Module, ::String) at ./loading.jl:1038
 [10] include at ./sysimg.jl:29 [inlined]
 [11] include(::String) at /Users/christopher.fisher/.julia/packages/PDMats/mL7bX/src/PDMats.jl:3
 [12] top-level scope at /Users/christopher.fisher/.julia/packages/PDMats/mL7bX/src/PDMats.jl:53
 [13] include at ./boot.jl:317 [inlined]
 [14] include_relative(::Module, ::String) at ./loading.jl:1038
 [15] include(::Module, ::String) at ./sysimg.jl:29
 [16] top-level scope at none:2
 [17] eval at ./boot.jl:319 [inlined]
 [18] eval(::Expr) at ./client.jl:389
 [19] top-level scope at ./none:3
in expression starting at /Users/christopher.fisher/.julia/packages/PDMats/mL7bX/src/pdsparsemat.jl:1
in expression starting at /Users/christopher.fisher/.julia/packages/PDMats/mL7bX/src/PDMats.jl:52
ERROR: LoadError: Failed to precompile PDMats [90014a1f-27ba-587c-ab20-58faa44d9150] to /Users/christopher.fisher/.julia/compiled/v1.0/PDMats/wuzEE.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] macro expansion at ./logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1184
 [4] _require(::Base.PkgId) at ./logging.jl:311
 [5] require(::Base.PkgId) at ./loading.jl:852
 [6] macro expansion at ./logging.jl:311 [inlined]
 [7] require(::Module, ::Symbol) at ./loading.jl:834
 [8] include at ./boot.jl:317 [inlined]
 [9] include_relative(::Module, ::String) at ./loading.jl:1038
 [10] include(::Module, ::String) at ./sysimg.jl:29
 [11] top-level scope at none:2
 [12] eval at ./boot.jl:319 [inlined]
 [13] eval(::Expr) at ./client.jl:389
 [14] top-level scope at ./none:3
in expression starting at /Users/christopher.fisher/.julia/packages/Distributions/WHjOk/src/Distributions.jl:3
ERROR: Failed to precompile Distributions [31c24e10-a181-5473-b8eb-7969acd0382f] to /Users/christopher.fisher/.julia/compiled/v1.0/Distributions/xILW0.ji.
Stacktrace:
 [1] macro expansion at ./logging.jl:313 [inlined]
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1184
 [3] macro expansion at ./logging.jl:311 [inlined]
 [4] _require(::Base.PkgId) at ./loading.jl:941
 [5] require(::Base.PkgId) at ./loading.jl:852
 [6] macro expansion at ./logging.jl:311 [inlined]
 [7] require(::Module, ::Symbol) at ./loading.jl:834

(v1.0) pkg> build Arpack
  Building Arpack → `~/.julia/packages/Arpack/UiiMc/deps/build.log`
┌ Error: Error building `Arpack`:
│ ERROR: LoadError: ArgumentError: Package Compat not found in current path:
│ - Run `Pkg.add("Compat")` to install the Compat package.
│
│ Stacktrace:
│ [1] require(::Module, ::Symbol) at ./loading.jl:817
│ [2] include at ./boot.jl:317 [inlined]
│ [3] include_relative(::Module, ::String) at ./loading.jl:1038
│ [4] include at ./sysimg.jl:29 [inlined]
│ [5] include_ifexists at ./client.jl:191 [inlined]
│ [6] load_julia_startup() at ./client.jl:288
│ [7] exec_options(::Base.JLOptions) at ./logging.jl:312
│ [8] _start() at ./client.jl:421
│ in expression starting at /Users/christopher.fisher/.julia/config/startup.jl:3
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1068

(v1.0) pkg> add Compat
 Resolving package versions...
  Updating `~/.julia/environments/v1.0/Project.toml`
 [no changes]
  Updating `~/.julia/environments/v1.0/Manifest.toml`
 [no changes]

(v1.0) pkg> build Arpack
  Building Arpack → `~/.julia/packages/Arpack/UiiMc/deps/build.log`
┌ Error: Error building `Arpack`:
│ ERROR: LoadError: ArgumentError: Package Compat not found in current path:
│ - Run `Pkg.add("Compat")` to install the Compat package.
│
│ Stacktrace:
│ [1] require(::Module, ::Symbol) at ./loading.jl:817
│ [2] include at ./boot.jl:317 [inlined]
│ [3] include_relative(::Module, ::String) at ./loading.jl:1038
│ [4] include at ./sysimg.jl:29 [inlined]
│ [5] include_ifexists at ./client.jl:191 [inlined]
│ [6] load_julia_startup() at ./client.jl:288
│ [7] exec_options(::Base.JLOptions) at ./logging.jl:312
│ [8] _start() at ./client.jl:421
│ in expression starting at /Users/christopher.fisher/.julia/config/startup.jl:3
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1068

(v1.0) pkg> st
    Status `~/.julia/environments/v1.0/Project.toml`
  [7d9fca2a] Arpack v0.3.0
  [c52e3926] Atom v0.7.8
  [6e4b80f9] BenchmarkTools v0.4.1
  [336ed68f] CSV v0.4.1
  [593b3428] CmdStan v4.3.0
  [35d6a980] ColorSchemes v2.0.0
  [34da2185] Compat v1.3.0
  [a93c6f00] DataFrames v0.14.1
  [0c46a032] DifferentialEquations v5.3.1
  [31c24e10] Distributions v0.16.4
  [7a1cc6ca] FFTW v0.2.4
  [38e38edf] GLM v1.0.1
  [a98d9a8b] Interpolations v0.10.3
  [682c06a0] JSON v0.19.0
  [e5e0dc1b] Juno v0.5.3
  [b964fa9f] LaTeXStrings v1.0.3
  [984bce1d] LambertW v0.4.3
  [1671dc4f] MCMCChain v0.2.2
  [6e857e4b] MCMCDiagnostics v0.3.0
  [429524aa] Optim v0.17.1
  [91a5bcdd] Plots v0.20.6
  [438e738f] PyCall v1.18.5
  [d330b81b] PyPlot v2.6.3
  [1fd47b50] QuadGK v2.0.2
  [6f49c342] RCall v0.12.1
  [e6cf234a] RandomNumbers v1.0.2
  [295af30f] Revise v0.7.12
  [80e77ffc] StanDataFrames v0.3.0
  [8f1571ae] StanMCMCChain v0.3.0
  [60ddc479] StatPlots v0.8.1
  [2913bbd2] StatsBase v0.25.0

(v1.0) pkg>```
````

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [October 17, 2018, 11:56am UTC](https://discourse.julialang.org/t/distributions-and-arpack-fail-to-build/16437/2 "2018-10-17T11:56:36Z")

</div>

My best bet is that you are using Julia `v1.0.0` and have `using Compat` in your `startup.jl` file. Julia `v1.0.0` does not have [don't use startup.jl when precompiling, building and testing by fredrikekre · Pull Request #470 · JuliaLang/Pkg.jl · GitHub](https://github.com/JuliaLang/Pkg.jl/pull/470) included. If this is the case you can either (i) upgrade to Julia `v1.0.1` (which is recommended anyway) or (ii) start Julia with `--startup-file=no` and then `pkg> build Arpack` again.

---

<div class="post-metadata">

**Author:** ![goedman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goedman/32/217_2.png) [@goedman](https://discourse.julialang.org/u/goedman)\
**Post date:** [October 17, 2018, 12:08pm UTC](https://discourse.julialang.org/t/distributions-and-arpack-fail-to-build/16437/3 "2018-10-17T12:08:00Z")

</div>

Hi Chris,

On Julia 1.0.1, a separate ()in Pkg mode) `build Arpack` solved the problem for me. Julia 1.1 does not build Arpack right now.

Best,  
Rob

---

<div class="post-metadata">

**Author:** ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Post date:** [October 17, 2018, 12:15pm UTC](https://discourse.julialang.org/t/distributions-and-arpack-fail-to-build/16437/4 "2018-10-17T12:15:01Z")

</div>

Thank you Rob and fredrikere. Upgrading to Julia 1.0.1 fixed the issue.

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [November 12, 2018, 9:05am UTC](https://discourse.julialang.org/t/distributions-and-arpack-fail-to-build/16437/5 "2018-11-12T09:05:26Z")

</div>

Hi, @fredrikekre, I thought that maybe the new `v"1.0.2"` might have fixed it, but that doesn’t seem to be the case. Any other ideas?

```julia
[yakir@yakir-thinkpad ~]$ julia --startup-file=no
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.0.2 (2018-11-08)
 _/ |\ __'_|_|_|\__'_| |  
|__/ |

(v1.0) pkg> build Arpack
  Building Arpack → `~/.julia/packages/Arpack/UiiMc/deps/build.log`
┌ Error: Error building `Arpack`: 
│ ERROR: LoadError: LibraryProduct(nothing, ["libarpack"], :libarpack, "Prefix(/home/yakir/.julia/packages/Arpack/UiiMc/deps/usr)") is not satisfied, cannot generate deps.jl!
│ Stacktrace:
│ [1] #write_deps_file#152(::Bool, ::Function, ::String, ::Array{LibraryProduct,1}) at /home/yakir/.julia/packages/BinaryProvider/1nGWd/src/Products.jl:408
│ [2] (::getfield(BinaryProvider, Symbol("#kw##write_deps_file")))(::NamedTuple{(:verbose,),Tuple{Bool}}, ::typeof(write_deps_file), ::String, ::Array{LibraryProduct,1}) at ./none:0
│ [3] top-level scope at none:0
│ [4] include(::String) at ./client.jl:392
│ [5] top-level scope at none:0
│ in expression starting at /home/yakir/.julia/packages/Arpack/UiiMc/deps/build.jl:74
└ @ Pkg.Operations /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1097

```

Thanks in advance!

---

<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, 12:39pm UTC](https://discourse.julialang.org/t/distributions-and-arpack-fail-to-build/16437/6 "2018-11-12T12:39:53Z")

</div>

@yakir12 Is this a self-compiled julia? Maybe you’re hitting [https://github.com/JuliaLinearAlgebra/Arpack.jl/issues/5](https://github.com/JuliaLinearAlgebra/Arpack.jl/issues/5) ?

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [November 12, 2018, 12:56pm UTC](https://discourse.julialang.org/t/distributions-and-arpack-fail-to-build/16437/7 "2018-11-12T12:56:13Z")

</div>

Nope, I’m on Manjaro and updated today.

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [November 12, 2018, 1:06pm UTC](https://discourse.julialang.org/t/distributions-and-arpack-fail-to-build/16437/8 "2018-11-12T13:06:11Z")

</div>

Actually, [this](https://github.com/JuliaLinearAlgebra/Arpack.jl/issues/5#issuecomment-437869878) did fix it, so you were right! Thanks!!!

---

<div class="post-metadata">

**Author:** ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Post date:** [May 16, 2019, 7:08pm UTC](https://discourse.julialang.org/t/distributions-and-arpack-fail-to-build/16437/9 "2019-05-16T19:08:11Z")

</div>

Thanks for this! I was bonking my head against the problem all morning. On Debian you should do:

```julia
sudo ln -s /usr/lib/x86_64-linux-gnu/libopenblas.so.0 /usr/lib/x86_64-linux-gnu/libopenblas64_.so.0

```

---

<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:** [May 17, 2019, 9:54pm UTC](https://discourse.julialang.org/t/distributions-and-arpack-fail-to-build/16437/10 "2019-05-17T21:54:44Z")

</div>

Have anyone solved this issue in Fedora or centos?

---

<div class="post-metadata">

**Author:** ![r0b0tlady](https://avatars.discourse-cdn.com/v4/letter/r/e47774/32.png) [@r0b0tlady](https://discourse.julialang.org/u/r0b0tlady)\
**Post date:** [August 8, 2019, 11:08am UTC](https://discourse.julialang.org/t/distributions-and-arpack-fail-to-build/16437/11 "2019-08-08T11:08:11Z")

</div>

Thank you. So much.

---

<div class="post-metadata">

**Author:** ![EveryNightLive](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/everynightlive/32/10880_2.png) [@EveryNightLive](https://discourse.julialang.org/u/EveryNightLive)\
**Post date:** [October 18, 2019, 3:44pm UTC](https://discourse.julialang.org/t/distributions-and-arpack-fail-to-build/16437/12 "2019-10-18T15:44:19Z")

</div>

@Yifan_Liu Maybe it’s too late but for anyone else looking for this:

Fedora 30:

> `ln -s /usr/lib64/libopenblas.so.0 /usr/lib64/libopenblas64_.so.0`

---

<div class="post-metadata">

**Author:** ![pogurek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pogurek/32/8887_2.png) [@pogurek](https://discourse.julialang.org/u/pogurek)\
**Post date:** [March 14, 2020, 2:15pm UTC](https://discourse.julialang.org/t/distributions-and-arpack-fail-to-build/16437/13 "2020-03-14T14:15:56Z")

</div>

Thanks a lot! Helped on Chromebook Debian Buster (Julia 1.0.3), too.
