Issue with installing packages

I’m getting dependencies error after I updated the julia version I probably end up messing up with environment which may be causing issue now. How can I solve this ?

       Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`
Precompiling project...
  ✗ Rmath
  ✗ FFTW
  ✗ SpecialFunctions
  ✗ DualNumbers
  ✗ ForwardDiff
  ✗ HypergeometricFunctions
  ✗ Tracker
  ✗ StatsFuns
  ✗ AdvancedHMC
  ✗ Distributions
  ✗ DistributionsAD
  ✗ Bijectors
  ✗ MCMCDiagnosticTools
  ✗ KernelDensity
  ✗ EllipticalSliceSampling
  ✗ AdvancedMH
  ✗ AdvancedPS
  ✗ DynamicPPL
  ✗ AdvancedVI
  ✗ MCMCChains
  ✗ Turing
  0 dependencies successfully precompiled in 28 seconds. 131 already precompiled.
  21 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages

Run ] precompile and post error message?

This is what I get.

ERROR: The following 1 direct dependency failed to precompile:

Turing [fce5fe82-541a-59a6-adf8-730c64b5f9a0]

Failed to precompile Turing [fce5fe82-541a-59a6-adf8-730c64b5f9a0] to /home/sahil.khan/.julia/compiled/v1.8/Turing/jl_Yh65nr.
ERROR: LoadError: InitError: could not load library "/home/sahil.khan/.julia/artifacts/abf4b5086b4eb867021118c85b2cc11a15b764a9/lib/libopenspecfun.so"
/home/sahil.khan/.julia/artifacts/abf4b5086b4eb867021118c85b2cc11a15b764a9/lib/libopenspecfun.so: cannot open shared object file: No such file or directory
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:117
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:116
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/QpMQW/src/products/library_generators.jl:54 [inlined]
  [4] __init__()
    @ OpenSpecFun_jll ~/.julia/packages/OpenSpecFun_jll/1Zaof/src/wrappers/x86_64-linux-gnu-libgfortran5.jl:9
  [5] _include_from_serialized(pkg::Base.PkgId, path::String, depmods::Vector{Any})
    @ Base ./loading.jl:831
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt64)
    @ Base ./loading.jl:1039
  [7] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1315
  [8] _require_prelocked(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1200
  [9] macro expansion
    @ ./loading.jl:1180 [inlined]
 [10] macro expansion
    @ ./lock.jl:223 [inlined]
 [11] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1144
 [12] include
    @ ./Base.jl:419 [inlined]
 [13] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1554
 [14] top-level scope
    @ stdin:1
during initialization of module OpenSpecFun_jll
in expression starting at /home/sahil.khan/.julia/packages/SpecialFunctions/gXPNz/src/SpecialFunctions.jl:1
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile SpecialFunctions [276daf66-3868-5448-9aa4-cd146d93841b] to /home/sahil.khan/.julia/compiled/v1.8/SpecialFunctions/jl_Jdufvn.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base ./loading.jl:1707
  [3] compilecache
    @ ./loading.jl:1651 [inlined]
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1337
  [5] _require_prelocked(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1200
  [6] macro expansion
    @ ./loading.jl:1180 [inlined]
  [7] macro expansion
    @ ./lock.jl:223 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1144
  [9] include
    @ ./Base.jl:419 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1554
 [11] top-level scope
    @ stdin:1
in expression starting at /home/sahil.khan/.julia/packages/ForwardDiff/vXysl/src/ForwardDiff.jl:1
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile ForwardDiff [f6369f11-7733-5829-9624-2563aa707210] to /home/sahil.khan/.julia/compiled/v1.8/ForwardDiff/jl_TmboN5.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base ./loading.jl:1707
  [3] compilecache
    @ ./loading.jl:1651 [inlined]
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1337
  [5] _require_prelocked(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1200
  [6] macro expansion
    @ ./loading.jl:1180 [inlined]
  [7] macro expansion
    @ ./lock.jl:223 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1144
  [9] include
    @ ./Base.jl:419 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1554
 [11] top-level scope
    @ stdin:1
in expression starting at /home/sahil.khan/.julia/packages/Turing/fLFsI/src/Turing.jl:1
in expression starting at stdin:1
Stacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types /data/home/sahil.khan/julia-1.8.5/share/julia/stdlib/v1.8/Pkg/src/Types.jl:67
 [2] precompile(ctx::Pkg.Types.Context, pkgs::Vector{String}; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Pkg.API /data/home/sahil.khan/julia-1.8.5/share/julia/stdlib/v1.8/Pkg/src/API.jl:1435
 [3] precompile
   @ /data/home/sahil.khan/julia-1.8.5/share/julia/stdlib/v1.8/Pkg/src/API.jl:1072 [inlined]
 [4] #precompile#225
   @ /data/home/sahil.khan/julia-1.8.5/share/julia/stdlib/v1.8/Pkg/src/API.jl:1071 [inlined]
 [5] precompile (repeats 2 times)
   @ /data/home/sahil.khan/julia-1.8.5/share/julia/stdlib/v1.8/Pkg/src/API.jl:1071 [inlined]
 [6] top-level scope
   @ REPL[9]:1

Is /home/sahil.khan/.julia/artifacts/abf4b5086b4eb867021118c85b2cc11a15b764a9 by any chance an empty directory? If it is, delete it and try again. Possibly you will need to run Pkg.instantiate to get it back, but now with contents.

Edit: Actually it’s maybe more likely that it is some dependent artifact that’s missing but I would expect you to have some empty directory among your artifacts.

Is there any way I can clean up everything and start everything from start ?

Its not empty.

if it’s related to artifacts cache, maybe delete entire /home/sahil.khan/.julia/artifacts/ and run ]up or ]instantiate

Yes, it’s safe to delete the artifacts directory. Everything there is fully reproducible.

I deleted ~/.julia and its working now.

1 Like