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.
But why does Julia even want to deal with CA certificates directly? Isn’t all what’s needed already in libcurl (to which it talks via LibCURL_jll, as far as I understand)?
Julia is using MbedTLS and the version of LibCURL distributed with official Julia is linked against MbedTLS:
Above, the OP is using Genie.jl which loads MbedTLS.jl which wraps the native library in MbedTLS_jll. Usually that is as follows:
julia> using MbedTLS_jll
julia> MbedTLS_jll.libmbedtls_path
"/home/mkitti/src/julia-1.8.1/bin/../lib/julia/libmbedtls.so.14"
Whoever setup the package on Gentoo likely swapped out Julia’s vendored libmedtls for a Gentoo package. However, they likely did not tell Julia where to find the certificates. That can be set via an environment variable:
If you insist on using the Gentoo package, then you should file a bug report with the Gentoo packagers:
Still, having an explicit /usr/share/julia/cert.pem is a security issue. In case it is not a symbolic link to someplace managed by the OS, but a file, it will be vulnerable to problems with CA certificates such as the recent TrustCor story.
On my Fedora 34 system at work, /usr/share/julia/cert.pem is a symbolic link to a 210K-big bundle of CA certs. As far as I know, Gentoo does not even have such a bundle available - and there is no need for it, technically speaking, as it’s more efficient to keep each certificate in a separate file (it does have a bundle of CA certs in another format, in
/etc/ssl/certs/ca-certificates.crt)
Yes, that’s how that’s supposed to work. Julia (or rather some internal tools used by Julia, like curl) needs a reference to the certificates file, it can come from anywhere, in Gentoo it comes from nowhere, they could have run the tests to catch the missing file