Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: LoadError: Failed to precompile HTTP #2221

Closed
bquast opened this issue Jul 21, 2022 · 4 comments
Closed

ERROR: LoadError: Failed to precompile HTTP #2221

bquast opened this issue Jul 21, 2022 · 4 comments
Labels
other packages Integration with other Julia packages

Comments

@bquast
Copy link

bquast commented Jul 21, 2022

Hello,

My error is:

Precompiling project...
  ✗ HTTP
  ✗ Pluto
  25 dependencies successfully precompiled in 6 seconds
  2 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages

(@v1.7) pkg> import Pkg; Pkg.precompile()
ERROR: `import` is not a recognized command. Type ? for help with available commands

julia> import Pkg; Pkg.precompile()
Precompiling project...
  ✗ HTTP
  ✗ Pluto
  0 dependencies successfully precompiled in 5 seconds (25 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/bquast/.julia/compiled/v1.7/Pluto/jl_MDehUh.
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
   @ ./io.jl:436 [inlined]
 [3] __sslinit__()
   @ MbedTLS ~/.julia/packages/MbedTLS/bYd4w/src/ssl.jl:780
 [4] __init__()
   @ MbedTLS ~/.julia/packages/MbedTLS/bYd4w/src/MbedTLS.jl:55
 [5] include(x::String)
   @ HTTP ~/.julia/packages/HTTP/aTjcj/src/HTTP.jl:1
 [6] top-level scope
   @ ~/.julia/packages/HTTP/aTjcj/src/HTTP.jl:33
 [7] top-level scope (repeats 2 times)
   @ none:1
during initialization of module MbedTLS
in expression starting at /home/bquast/.julia/packages/HTTP/aTjcj/src/IOExtras.jl:1
in expression starting at /home/bquast/.julia/packages/HTTP/aTjcj/src/HTTP.jl:1
ERROR: LoadError: Failed to precompile HTTP [cd3eb016-35fb-5094-929b-558a96fad6f3] to /home/bquast/.julia/compiled/v1.7/HTTP/jl_EAI6Fo.
Stacktrace:
 [1] include(x::String)
   @ Pluto ~/.julia/packages/Pluto/9zGI7/src/Pluto.jl:11
 [2] top-level scope
   @ ~/.julia/packages/Pluto/9zGI7/src/Pluto.jl:62
 [3] top-level scope (repeats 2 times)
   @ none:1
in expression starting at /home/bquast/.julia/packages/Pluto/9zGI7/src/notebook/Events.jl:1
in expression starting at /home/bquast/.julia/packages/Pluto/9zGI7/src/Pluto.jl:1
Stacktrace:
 [1] top-level scope
   @ REPL[3]:1

(@v1.7) pkg> add HTTP
   Resolving package versions...
    Updating `~/.julia/environments/v1.7/Project.toml`
  [cd3eb016] + HTTP v0.9.17
  No Changes to `~/.julia/environments/v1.7/Manifest.toml`

julia> 

Gist: https://gist.github.com/bquast/83a53d4cb5349f4802d94cb97cf0c858

@rikhuijzer
Copy link
Collaborator

Looks like an MbedTLS.jl issue. Similar to JuliaLang/MbedTLS.jl#229. What happens if you do

julia> using Pkg; Pkg.activate(; temp=true);

julia> Pkg.add("MbedTLS")

if that errors then please open an issue at MbedTLS.

@Pangoraw Pangoraw added the other packages Integration with other Julia packages label Jul 22, 2022
@ZephyrHeather
Copy link

Hi, I've encountered the same problem today, and i tried

julia> using Pkg; Pkg.activate(; temp=true);

julia> Pkg.add("MbedTLS")

and there was no error reported.

Then I found this -- Problems installing packages - cert.pm no such file. It seems that the package from the official repositories on Arch Linux has many problems.

Warning: Package julia is compiled against system libraries and is therefore unsupported by the upstream. While it may be suitable for basic usage it is incompatible with external packages (e.g. MKL, LLVM, LLVMExtra, or packages that depend on these, like CUDA or Flux) which rely on Julia's bundled versions of its dependencies. Bugs reported against this binary will be closed. (See Julia - ArchWiki)

And julia-bin provides official builds compiled against patched LLVM libs, thus solved the problem.

So if you're also using Arch Linux, try aur:julia-bin, that works for me.

@Heptazhou
Copy link

@ZephyrHeather is correct.

However this specific issue can also be fixed (for Arch at least) by simply running:

sudo ln -s /etc/ssl/cert.pem /usr/share/julia/cert.pem

@rikhuijzer
Copy link
Collaborator

This issue appears to be unrelated to Pluto and multiple solutions have been offered, so I'll close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
other packages Integration with other Julia packages
Projects
None yet
Development

No branches or pull requests

5 participants