Precompile errors with `pkg> update` or `pkg> add` for some packages

In the package manager I was getting some precompilation errors when trying to update Julia. So I have removed all the offending packages, which included Pluto and tried to add Pluto again with the following result:

(@v1.7) pkg> precompile

(@v1.7) pkg> add Pluto
   Resolving package versions...
    Updating `~/.julia/environments/v1.7/Project.toml`
  [c3e4b0f8] + Pluto v0.19.9
    Updating `~/.julia/environments/v1.7/Manifest.toml`
  [5218b696] + Configurations v0.17.3
  [55351af7] + ExproniconLite v0.6.13
  [fb4132e2] + FuzzyCompletions v0.5.0
  [ac1192a8] + HypertextLiteral v0.9.4
  [6c6e2e6c] + MIMEs v0.1.4
  [99f44e22] + MsgPack v1.1.0
  [c3e4b0f8] + Pluto v0.19.9
  [91cefc8d] + PrecompileSignatures v3.0.3
  [410a4b4d] + Tricks v0.1.6
Precompiling project...
  ✗ Pluto
  0 dependencies successfully precompiled in 10 seconds (210 already precompiled)
  1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package

(@v1.7) pkg> precompile
Precompiling project...
  ✗ Pluto
  0 dependencies successfully precompiled in 11 seconds (210 already precompiled)

ERROR: The following 1 direct dependency failed to precompile:

Pluto [c3e4b0f8-55cb-11ea-2926-15256bba5781]

Failed to precompile Pluto [c3e4b0f8-55cb-11ea-2926-15256bba5781] to /home/kw/.julia/compiled/v1.7/Pluto/jl_dNQlkc.
ERROR: LoadError: InitError: SystemError: opening file "/usr/share/julia/cert.pem": No such file or directory
 [1] open
   @ ./io.jl:328 [inlined]
 [2] read(filename::String, #unused#::Type{String})
   @ Base ./io.jl:436
 [3] __sslinit__()
   @ MbedTLS ~/.julia/packages/MbedTLS/qUI5E/src/ssl.jl:785
 [4] __init__()
   @ MbedTLS ~/.julia/packages/MbedTLS/qUI5E/src/MbedTLS.jl:55
 [5] include(x::String)
   @ Pluto ~/.julia/packages/Pluto/9zGI7/src/Pluto.jl:11
 [6] top-level scope
   @ ~/.julia/packages/Pluto/9zGI7/src/Pluto.jl:62
 [7] top-level scope (repeats 2 times)
   @ none:1
during initialization of module MbedTLS
in expression starting at /home/kw/.julia/packages/Pluto/9zGI7/src/notebook/Events.jl:1
in expression starting at /home/kw/.julia/packages/Pluto/9zGI7/src/Pluto.jl:1

Can anyone offer me some guidance on how to fix this problem.

It has only recently become a problem, I have not had any errors when adding packages in the past and neither have I made any changes anywhere. However I have recently installed and been learning to use Julia in VSCode, could that be related to this problem?

My system is Manjaro Linux.

@quinnj this looks related to Switch default cert to MozillaCACerts_jll by quinnj · Pull Request #238 · JuliaLang/MbedTLS.jl · GitHub.

I solved this problem in the following way.

  1. Download the nightlies Julia
  2. Unpack
  3. Go to julia-####/share/julia
  4. Copy cert.pem to the place where is is required, in our case /usr/share/julia
  5. Enjoy :smile:

Hope it solves your problem.

I forgot something to mention, that might be important in the future. When you decide to reintall julia, or maybe in the next update, it could be possible that the update will give you an error. Something like “/usr/share/julia/cert.pem arleady exist” , then , you need to delete it, and , it would work find.

1 Like


Summary: in Arch Linux use the package aur:julia-bin which simply redistributes the official binaries, don’t use the package in the official repositories, which has lots of problems. This is also documented in Arch Linux wiki.


That does indeed appear to be the essential information I needed to fix this problem, I have now replaced Julia from the Manjaro repositories with the aur: julia-bin version.

1 Like