# Problem installing NetCDF

**URL:** https://discourse.julialang.org/t/problem-installing-netcdf/59001
**Category:** New to Julia
**Created:** [April 10, 2021, 6:11pm UTC](https://discourse.julialang.org/t/problem-installing-netcdf/59001 "2021-04-10T18:11:19Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![meck](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@meck](https://discourse.julialang.org/u/meck)
#### Post date: [April 10, 2021, 6:11pm UTC](https://discourse.julialang.org/t/problem-installing-netcdf/59001/1 "2021-04-10T18:11:20Z")

</div>

What could be the cause for this?

```julia
(@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

```

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [April 10, 2021, 6:21pm UTC](https://discourse.julialang.org/t/problem-installing-netcdf/59001/2 "2021-04-10T18:21:49Z")

</div>

If you run

```julia
using NetCDF

```

you can see the actual error message

---

<div class="post-metadata">

### Author: ![meck](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@meck](https://discourse.julialang.org/u/meck)
#### Post date: [April 10, 2021, 6:41pm UTC](https://discourse.julialang.org/t/problem-installing-netcdf/59001/3 "2021-04-10T18:41:25Z")

</div>

```julia
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

```

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [April 10, 2021, 6:46pm UTC](https://discourse.julialang.org/t/problem-installing-netcdf/59001/4 "2021-04-10T18:46:59Z")

</div>

So this is basically a duplicate of [Package used to work, after update to 1.6 it doesnt anymore](https://discourse.julialang.org/t/package-used-to-work-after-update-to-1-6-it-doesnt-anymore/58920), where I’m still waiting for you to answer to my question about how you installed Julia (or a `strace` log)

---

<div class="post-metadata">

### Author: ![meck](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@meck](https://discourse.julialang.org/u/meck)
#### Post date: [April 10, 2021, 6:49pm UTC](https://discourse.julialang.org/t/problem-installing-netcdf/59001/5 "2021-04-10T18:49:26Z")

</div>

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

---

<div class="post-metadata">

### Author: ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)
#### Post date: [April 11, 2021, 12:37am UTC](https://discourse.julialang.org/t/problem-installing-netcdf/59001/6 "2021-04-11T00:37:17Z")

</div>

@meck I recommend [https://github.com/Alexander-Barth/NCDatasets.jl](https://github.com/Alexander-Barth/NCDatasets.jl)
