# Failed to precompile Plots.jl

**URL:** <https://discourse.julialang.org/t/failed-to-precompile-plots-jl/89802>\
**Category:** New to Julia\
**Tags:** question, package, plotting\
**Created:** [November 5, 2022, 8:43am UTC](https://discourse.julialang.org/t/failed-to-precompile-plots-jl/89802 "2022-11-05T08:43:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frauke](https://avatars.discourse-cdn.com/v4/letter/f/b5e925/32.png) [@Frauke](https://discourse.julialang.org/u/Frauke)\
**Post date:** [November 5, 2022, 8:43am UTC](https://discourse.julialang.org/t/failed-to-precompile-plots-jl/89802/1 "2022-11-05T08:43:57Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![RayleighLord](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rayleighlord/32/33592_2.png) [@RayleighLord](https://discourse.julialang.org/u/RayleighLord)\
**Post date:** [November 5, 2022, 9:13am UTC](https://discourse.julialang.org/t/failed-to-precompile-plots-jl/89802/2 "2022-11-05T09:13:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [November 5, 2022, 10:34am UTC](https://discourse.julialang.org/t/failed-to-precompile-plots-jl/89802/3 "2022-11-05T10:34:35Z")

</div>

Try the answer [here](https://discourse.julialang.org/t/plots-and-gr-jll-is-not-working-and-fails-to-precompile/89657/4), adjusted to your error:

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

---

<div class="post-metadata">

**Author:** ![Frauke](https://avatars.discourse-cdn.com/v4/letter/f/b5e925/32.png) [@Frauke](https://discourse.julialang.org/u/Frauke)\
**Post date:** [November 5, 2022, 2:55pm UTC](https://discourse.julialang.org/t/failed-to-precompile-plots-jl/89802/4 "2022-11-05T14:55:48Z")

</div>

Problem solved! Made my day, thank you!

---

<div class="post-metadata">

**Author:** ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)\
**Post date:** [February 1, 2023, 12:09pm UTC](https://discourse.julialang.org/t/failed-to-precompile-plots-jl/89802/5 "2023-02-01T12:09:30Z")

</div>

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
