Problem installing NetCDF

What could be the cause for this?

(@v1.6) pkg> add NetCDF
  Installing known registries into `~/.julia`
       Added registry `General` to `~/.julia/registries/General`
   Resolving package versions...
   Installed DiskArrays ── v0.2.7
   Installed HDF5_jll ──── v1.12.0+1
   Installed NetCDF_jll ── v400.702.400+0
   Installed OpenSSL_jll ─ v1.1.1+6
   Installed JLLWrappers ─ v1.2.0
   Installed Formatting ── v0.4.2
   Installed NetCDF ────── v0.11.3
  Downloaded artifact: OpenSSL
  Downloaded artifact: NetCDF
  Downloaded artifact: HDF5
    Updating `~/.julia/environments/v1.6/Project.toml`
  [30363a11] + NetCDF v0.11.3
    Updating `~/.julia/environments/v1.6/Manifest.toml`
  [3c3547ce] + DiskArrays v0.2.7
  [59287772] + Formatting v0.4.2
  [692b3bcd] + JLLWrappers v1.2.0
  [30363a11] + NetCDF v0.11.3
  [0234f1f7] + HDF5_jll v1.12.0+1
  [7243133f] + NetCDF_jll v400.702.400+0
  [458c3c95] + OpenSSL_jll v1.1.1+6
  [0dad84c5] + ArgTools
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [f43a241f] + Downloads
  [b77e0a4c] + InteractiveUtils
  [b27032c2] + LibCURL
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [ca575930] + NetworkOptions
  [44cfe95a] + Pkg
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [fa267f1f] + TOML
  [a4e569a6] + Tar
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [deac9b47] + LibCURL_jll
  [29816b5a] + LibSSH2_jll
  [c8ffd9c3] + MbedTLS_jll
  [14a3606d] + MozillaCACerts_jll
  [83775a58] + Zlib_jll
  [8e850ede] + nghttp2_jll
  [3f19e933] + p7zip_jll
Precompiling project...
  Progress [========================================>]  10/10
  ✗ NetCDF
9 dependencies successfully precompiled in 6 seconds
1 dependency errored

If you run

using NetCDF

you can see the actual error message

julia> using NetCDF
[ Info: Precompiling NetCDF [30363a11-5582-574a-97bb-aa9a979735b9]
ERROR: LoadError: InitError: could not load library "/home/meck/.julia/artifacts/0a7f440ba143b238cc3dd0def2956d34d76755f3/lib/libnetcdf.so"
libmbedcrypto.so.5: cannot open shared object file: No such file or directory
Stacktrace:
 [1] dlopen(s::String, flags::UInt32)
   @ Base.Libc.Libdl ./libdl.jl:114
 [2] macro expansion
   @ ~/.julia/packages/JLLWrappers/WnWcZ/src/products/library_generators.jl:63 [inlined]
 [3] __init__()
   @ NetCDF_jll ~/.julia/packages/NetCDF_jll/xjKDT/src/wrappers/x86_64-linux-gnu.jl:14
 [4] top-level scope (repeats 2 times)
   @ none:1
during initialization of module NetCDF_jll
in expression starting at /home/meck/.julia/packages/NetCDF/QftOe/src/NetCDF.jl:1
ERROR: Failed to precompile NetCDF [30363a11-5582-574a-97bb-aa9a979735b9] to /home/meck/.julia/compiled/v1.6/NetCDF/jl_1SGMwi.
Stacktrace:
 [1] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
   @ Base ./loading.jl:1360

So this is basically a duplicate of Package used to work, after update to 1.6 it doesnt anymore, where I’m still waiting for you to answer to my question about how you installed Julia (or a strace log)

Ok sorry, I will close this then. I thought this would narrow down the issue.

@meck I recommend GitHub - Alexander-Barth/NCDatasets.jl: Load and create NetCDF files in Julia

2 Likes