pkg> add NCDatasets
gave an error message 1 dependency errored. To see a full report either run import Pkg; Pkg.precompile()
.
So, I did import Pkg; Pkg.precompile()
and got the messages at the bottom.
I use macOS Catalina (10.15.7) and install julia by homebrew. It’s Julia stable 1.7.2.
How can one solve this problem?
Precompiling project...
✗ NCDatasets
0 dependencies successfully precompiled in 2 seconds (15 already precompiled)
ERROR: The following 1 direct dependency failed to precompile:
NCDatasets [85f8d34a-cbdd-5861-8df4-14fed0d494ab]
Failed to precompile NCDatasets [85f8d34a-cbdd-5861-8df4-14fed0d494ab] to /Users/furue/.julia/compiled/v1.7/NCDatasets/jl_l1MBJh.
ERROR: LoadError: InitError: could not load library "/Users/furue/.julia/artifacts/0b92c3ca1de2e9dc46a381553278edd25af54980/lib/libnetcdf.18.dylib"
dlopen(/Users/furue/.julia/artifacts/0b92c3ca1de2e9dc46a381553278edd25af54980/lib/libnetcdf.18.dylib, 1): Library not loaded: @rpath/libmbedtls.13.dylib
Referenced from: /Users/furue/.julia/artifacts/0b92c3ca1de2e9dc46a381553278edd25af54980/lib/libnetcdf.18.dylib
Reason: image not found
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:117
[3] macro expansion
@ ~/.julia/packages/JLLWrappers/QpMQW/src/products/library_generators.jl:54 [inlined]
[4] __init__()
@ NetCDF_jll ~/.julia/packages/NetCDF_jll/xjKDT/src/wrappers/x86_64-apple-darwin.jl:14
[5] _include_from_serialized(path::String, depmods::Vector{Any})
@ Base ./loading.jl:768
[6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
@ Base ./loading.jl:854
[7] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1097
[8] require(uuidkey::Base.PkgId)
@ Base ./loading.jl:1013
[9] require(into::Module, mod::Symbol)
@ Base ./loading.jl:997
[10] include
@ ./Base.jl:418 [inlined]
[11] 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:1318
[12] top-level scope
@ none:1
[13] eval
@ ./boot.jl:373 [inlined]
[14] eval(x::Expr)
@ Base.MainInclude ./client.jl:453
[15] top-level scope
@ none:1
during initialization of module NetCDF_jll
in expression starting at /Users/furue/.julia/packages/NCDatasets/XVX8L/src/NCDatasets.jl:1
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types /usr/local/Cellar/julia/1.7.2/share/julia/stdlib/v1.7/Pkg/src/Types.jl:68
[2] precompile(ctx::Pkg.Types.Context; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API /usr/local/Cellar/julia/1.7.2/share/julia/stdlib/v1.7/Pkg/src/API.jl:1362
[3] precompile
@ /usr/local/Cellar/julia/1.7.2/share/julia/stdlib/v1.7/Pkg/src/API.jl:1013 [inlined]
[4] #precompile#220
@ /usr/local/Cellar/julia/1.7.2/share/julia/stdlib/v1.7/Pkg/src/API.jl:1011 [inlined]
[5] precompile()
@ Pkg.API /usr/local/Cellar/julia/1.7.2/share/julia/stdlib/v1.7/Pkg/src/API.jl:1011
[6] top-level scope
@ REPL[6]:1