Problems installing packages - cert.pm no such file

I am trying to use the Genie web framework and I get the following error when I try to use it on my Arch Linux:

julia> using Genie
[ Info: Precompiling Genie [c43c736e-a2d1-11e8-161f-af95117fbd1e]
ERROR: LoadError: InitError: SystemError: opening file "/usr/share/julia/cert.pem": No such file or directory
Stacktrace:
 [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] top-level scope (repeats 2 times)
   @ none:1
during initialization of module MbedTLS
in expression starting at /home/jdarnold/.julia/packages/VersionCheck/IzZOn/src/VersionCheck.jl:1
ERROR: LoadError: Failed to precompile VersionCheck [a637dc6b-bca1-447e-a4fa-35264c9d0580] to /home/jdarnold/.julia/compiled/v1.7/VersionCheck/jl_TrpQIr.
Stacktrace:
 [1] include(x::String)
   @ Genie ~/.julia/packages/Genie/hbOGK/src/Genie.jl:4
 [2] top-level scope
   @ ~/.julia/packages/Genie/hbOGK/src/Genie.jl:12
 [3] top-level scope (repeats 2 times)
   @ none:1
in expression starting at /home/jdarnold/.julia/packages/Genie/hbOGK/src/Configuration.jl:1
in expression starting at /home/jdarnold/.julia/packages/Genie/hbOGK/src/Genie.jl:1
ERROR: Failed to precompile Genie [c43c736e-a2d1-11e8-161f-af95117fbd1e] to /home/jdarnold/.julia/compiled/v1.7/Genie/jl_QRz4ze.

Just to check I tried installing another package and got the same error. I’ve looked around but I don’t see the answer to fixing this.

How did you install Julia on Arch Linux?

1 Like

Probably the same issue as Precompile errors with `pkg> update` or `pkg> add` for some packages

Ok, my educated guess is that you installed the package from the official repositories, which is well known to have plenty of problems: Julia - ArchWiki. Evidence: the error message is pointing to
MbedTLS.jl/ssl.jl at 0c02e44ed96bf09ce3b9fb649db5914f629c2812 · JuliaLang/MbedTLS.jl · GitHub
and the variable MozillaCACerts_jll.cacert is apparently pointing to a non-existing file. You should direct your complaint to the maintainers of the Julia package in Arch Linux, who provide malfunctioning packages.

In the meantime I warmly recommend you to use the package aur:julia-bin which simply redistributes the official binaries.

5 Likes

Thanks, that sounds like it. Pretty sure it is the “official” package. I will use the AUR bin one.

Edited to add: Yup. Just installed julia-bin and using Genie works fine. Thanks again.

3 Likes