Failed to precompile Plots.jl

Hi,
I’m new to Julia and having troubles with the compilation of Plots.jl. I was able to add the package but it does not precompile as “libx265.dll” seems to be missing. I am far from beeing a computer expert, so I would really much appreciate your help!

julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
ERROR: LoadError: InitError: could not load library “C:\Users\frauk.julia\artifacts\da2e0ac84abbe712490f8ee73aca3d512f1eaaab\bin\libx265.dll”
Das angegebene Modul wurde nicht gefunden.
Stacktrace:
[1] dlopen(s::String, flags::UInt32; throw_error::Bool)
@ Base.Libc.Libdl .\libdl.jl:117
[2] dlopen(s::String, flags::UInt32)
@ Base.Libc.Libdl .\libdl.jl:116
[3] macro expansion
@ C:\Users\frauk.julia\packages\JLLWrappers\QpMQW\src\products\library_generators.jl:54 [inlined]
[4] init()
@ x265_jll C:\Users\frauk.julia\packages\x265_jll\9auB3\src\wrappers\x86_64-w64-mingw32.jl:9
[5] _include_from_serialized(pkg::Base.PkgId, path::String, depmods::Vector{Any})
@ Base .\loading.jl:831
[6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt64)
@ Base .\loading.jl:1039
[7] _require(pkg::Base.PkgId)
@ Base .\loading.jl:1315
[8] _require_prelocked(uuidkey::Base.PkgId)
@ Base .\loading.jl:1200
[9] macro expansion
@ .\loading.jl:1180 [inlined]
[10] macro expansion
@ .\lock.jl:223 [inlined]
[11] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1144
[12] include(mod::Module, _path::String)
@ Base .\Base.jl:419
[13] top-level scope
@ C:\Users\frauk.julia\packages\JLLWrappers\QpMQW\src\toplevel_generators.jl:188
[14] include
@ .\Base.jl:419 [inlined]
[15] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
@ Base .\loading.jl:1554
[16] top-level scope
@ stdin:1
during initialization of module x265_jll
in expression starting at C:\Users\frauk.julia\packages\FFMPEG_jll\OCtN5\src\wrappers\x86_64-w64-mingw32.jl:13
in expression starting at C:\Users\frauk.julia\packages\FFMPEG_jll\OCtN5\src\FFMPEG_jll.jl:2
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile FFMPEG_jll [b22a6f82-2f65-5046-a5b2-351ab43fb4e5] to C:\Users\frauk.julia\compiled\v1.8\FFMPEG_jll\jl_B4A0.tmp.
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base .\loading.jl:1705
[3] compilecache
@ .\loading.jl:1649 [inlined]
[4] _require(pkg::Base.PkgId)
@ Base .\loading.jl:1337
[5] _require_prelocked(uuidkey::Base.PkgId)
@ Base .\loading.jl:1200
[6] macro expansion
@ .\loading.jl:1180 [inlined]
[7] macro expansion
@ .\lock.jl:223 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1144
[9] include
@ .\Base.jl:419 [inlined]
[10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
@ Base .\loading.jl:1554
[11] top-level scope
@ stdin:1
in expression starting at C:\Users\frauk.julia\packages\FFMPEG\OUpap\src\FFMPEG.jl:1
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] to C:\Users\frauk.julia\compiled\v1.8\FFMPEG\jl_B368.tmp.
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base .\loading.jl:1705
[3] compilecache
@ .\loading.jl:1649 [inlined]
[4] _require(pkg::Base.PkgId)
@ Base .\loading.jl:1337
[5] _require_prelocked(uuidkey::Base.PkgId)
@ Base .\loading.jl:1200
[6] macro expansion
@ .\loading.jl:1180 [inlined]
[7] macro expansion
@ .\lock.jl:223 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1144
[9] include(mod::Module, _path::String)
@ Base .\Base.jl:419
[10] include(x::String)
@ Plots C:\Users\frauk.julia\packages\Plots\AAjgN\src\Plots.jl:1
[11] top-level scope
@ C:\Users\frauk.julia\packages\Plots\AAjgN\src\Plots.jl:182
[12] include
@ .\Base.jl:419 [inlined]
[13] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
@ Base .\loading.jl:1554
[14] top-level scope
@ stdin:1
in expression starting at C:\Users\frauk.julia\packages\Plots\AAjgN\src\animation.jl:1
in expression starting at C:\Users\frauk.julia\packages\Plots\AAjgN\src\Plots.jl:1
in expression starting at stdin:1
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to C:\Users\frauk.julia\compiled\v1.8\Plots\jl_961C.tmp.
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base .\loading.jl:1705
[3] compilecache
@ .\loading.jl:1649 [inlined]
[4] _require(pkg::Base.PkgId)
@ Base .\loading.jl:1337
[5] _require_prelocked(uuidkey::Base.PkgId)
@ Base .\loading.jl:1200
[6] macro expansion
@ .\loading.jl:1180 [inlined]
[7] macro expansion
@ .\lock.jl:223 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1144

I know that there are similar issues that already have been discussed but I do not have a Windows N version. I am currently working on Windows 10 Pro.

Thanks!

Have you tried to execute in a Julia REPL ] build Plots?

Try the answer here, adjusted to your error:

Delete C:\Users\frauk.julia\artifacts\da2e0ac84abbe712490f8ee73aca3d512f1eaaab and run pkg> instantiate (it should trigger the download of the artifact again).

1 Like

Problem solved! Made my day, thank you!

I teach large classes and my students are getting this same error.
The solution here (while useful for advanced users) is too complicated for students just beginning Julia.

I tried having them remove/resinstall or do builds, but that doesn’t seem to work for this error - is there another simpler way of achieving the same thing?
Thanks for any help