Installing Pluto: Precompiling failed

Hi everyone,

I’m trying to install Pluto following https://computationalthinking.mit.edu/Fall20/installation/

After “import Pluto” I get the following errors:

ERROR: LoadError: InitError: could not load library "C:\Users\ThisUser\.julia\artifacts\a5355b4efc1953f6d15e22618ff5dabbbd0f84dd\bin\libmbedcrypto.dll"
The specified module could not be found.

ERROR: LoadError: LoadError: Failed to precompile MbedTLS [739be429-bea8-5141-9913-cc70e7f3736d] to C:\Users\ThisUser\.julia\compiled\v1.5\MbedTLS\bf9T0_pHagC.ji.

ERROR: LoadError: LoadError: Failed to precompile HTTP [cd3eb016-35fb-5094-929b-558a96fad6f3] to C:\Users\ThisUser\.julia\compiled\v1.5\HTTP\zXWya_pHagC.ji.

ERROR: Failed to precompile Pluto [c3e4b0f8-55cb-11ea-2926-15256bba5781] to C:\Users\ThisUser\.julia\compiled\v1.5\Pluto\OJqMt_pHagC.ji.

I’m on a Windows 10 (64 bit) machine using Julia 1.5.3. Any ideas how i can make the installation work?

PS: Complete output:

julia>  using Pluto
[ Info: Precompiling Pluto [c3e4b0f8-55cb-11ea-2926-15256bba5781]
ERROR: LoadError: InitError: could not load library "C:\Users\ThisUser\.julia\artifacts\a5355b4efc1953f6d15e22618ff5dabbbd0f84dd\bin\libmbedcrypto.dll"
The specified module could not be found.
Stacktrace:
 [1] dlopen(::String, ::UInt32; throw_error::Bool) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Libdl\src\Libdl.jl:109
 [2] dlopen(::String, ::UInt32) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Libdl\src\Libdl.jl:109
 [3] macro expansion at C:\Users\ThisUser\.julia\packages\JLLWrappers\KuIwt\src\products\library_generators.jl:61 [inlined]
 [4] __init__() at C:\Users\ThisUser\.julia\packages\MbedTLS_jll\qMb7d\src\wrappers\x86_64-w64-mingw32.jl:10
 [5] _include_from_serialized(::String, ::Array{Any,1}) at .\loading.jl:697
 [6] _require_search_from_serialized(::Base.PkgId, ::String) at .\loading.jl:782
 [7] _require(::Base.PkgId) at .\loading.jl:1007
 [8] require(::Base.PkgId) at .\loading.jl:928
 [9] require(::Module, ::Symbol) at .\loading.jl:923
 [10] include(::Function, ::Module, ::String) at .\Base.jl:380
 [11] include(::Module, ::String) at .\Base.jl:368
 [12] top-level scope at none:2
 [13] eval at .\boot.jl:331 [inlined]
 [14] eval(::Expr) at .\client.jl:467
 [15] top-level scope at .\none:3
during initialization of module MbedTLS_jll
in expression starting at C:\Users\ThisUser\.julia\packages\MbedTLS\4YY6E\src\MbedTLS.jl:3
ERROR: LoadError: LoadError: Failed to precompile MbedTLS [739be429-bea8-5141-9913-cc70e7f3736d] to C:\Users\ThisUser\.julia\compiled\v1.5\MbedTLS\bf9T0_pHagC.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1305
 [3] _require(::Base.PkgId) at .\loading.jl:1030
 [4] require(::Base.PkgId) at .\loading.jl:928
 [5] require(::Module, ::Symbol) at .\loading.jl:923
 [6] include(::Function, ::Module, ::String) at .\Base.jl:380
 [7] include at .\Base.jl:368 [inlined]
 [8] include(::String) at C:\Users\ThisUser\.julia\packages\HTTP\IAI92\src\HTTP.jl:1
 [9] top-level scope at C:\Users\ThisUser\.julia\packages\HTTP\IAI92\src\HTTP.jl:18
 [10] include(::Function, ::Module, ::String) at .\Base.jl:380
 [11] include(::Module, ::String) at .\Base.jl:368
 [12] top-level scope at none:2
 [13] eval at .\boot.jl:331 [inlined]
 [14] eval(::Expr) at .\client.jl:467
 [15] top-level scope at .\none:3
in expression starting at C:\Users\ThisUser\.julia\packages\HTTP\IAI92\src\IOExtras.jl:11
in expression starting at C:\Users\ThisUser\.julia\packages\HTTP\IAI92\src\HTTP.jl:18
ERROR: LoadError: LoadError: Failed to precompile HTTP [cd3eb016-35fb-5094-929b-558a96fad6f3] to C:\Users\ThisUser\.julia\compiled\v1.5\HTTP\zXWya_pHagC.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1305
 [3] _require(::Base.PkgId) at .\loading.jl:1030
 [4] require(::Base.PkgId) at .\loading.jl:928
 [5] require(::Module, ::Symbol) at .\loading.jl:923
 [6] include(::Function, ::Module, ::String) at .\Base.jl:380
 [7] include at .\Base.jl:368 [inlined]
 [8] include(::String) at C:\Users\ThisUser\.julia\packages\Pluto\SseIQ\src\Pluto.jl:11
 [9] top-level scope at C:\Users\ThisUser\.julia\packages\Pluto\SseIQ\src\Pluto.jl:48
 [10] include(::Function, ::Module, ::String) at .\Base.jl:380
 [11] include(::Module, ::String) at .\Base.jl:368
 [12] top-level scope at none:2
 [13] eval at .\boot.jl:331 [inlined]
 [14] eval(::Expr) at .\client.jl:467
 [15] top-level scope at .\none:3
in expression starting at C:\Users\ThisUser\.julia\packages\Pluto\SseIQ\src\webserver\Static.jl:1
in expression starting at C:\Users\ThisUser\.julia\packages\Pluto\SseIQ\src\Pluto.jl:48
ERROR: Failed to precompile Pluto [c3e4b0f8-55cb-11ea-2926-15256bba5781] to C:\Users\ThisUser\.julia\compiled\v1.5\Pluto\OJqMt_pHagC.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1305
 [3] _require(::Base.PkgId) at .\loading.jl:1030
 [4] require(::Base.PkgId) at .\loading.jl:928
 [5] require(::Module, ::Symbol) at .\loading.jl:923

Yep, broken due to a MbedTLS problem. But that’s with Julia 1.6dev because with 1.5, I get

julia> using Pluto
[ Info: Precompiling Pluto [c3e4b0f8-55cb-11ea-2926-15256bba5781]
┌ Warning: Platform `aarch64-apple-darwin` is not an officially supported platform
└ @ Pkg.BinaryPlatforms D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\BinaryPlatforms.jl:509
ERROR: LoadError: ArgumentError: Unsupported architecture 'aarch64' for macOS

All would be better if Windows artifacts were built with Visual Studio.

Thanks for the answer! So I guess we have to wait for an official fix then?

What worked for me in the meantime was copying

libmbedcrypto.dll
libmbedtls.dll
libmbedx509.dll

from
C:\Users\ThisUser\AppData\Local\Programs\Julia 1.5.3\bin
to
C:\Users\ThisUser\.julia\artifacts\a5355b4efc1953f6d15e22618ff5dabbbd0f84dd\bin

(had to make the \bin folder)
I don’t know if this is something advisable to do, but for now Pluto is running.

So if those come with Julia it mean there should be no need to have a MbedTLD_jll artifact. That looks a very good candidate for the root of the problem.