Any hint on how to solve this precompilation problem? I’m using an environment and all the packages seem up to date.
precompile
Precompiling project...
✗ Plots
0 dependencies successfully precompiled in 2 seconds. 180 already precompiled.
ERROR: The following 1 direct dependency failed to precompile:
Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /home/leandro/.julia/compiled/v1.8/Plots/jl_YLLoQ5.
ERROR: LoadError: syntax: Global method definition around /home/leandro/.julia/packages/RecipesBase/eU0hg/src/RecipesBase.jl:607 needs to be placed at the top level, or use "eval".
Stacktrace:
[1] top-level scope
@ ~/.julia/packages/RecipesBase/eU0hg/src/RecipesBase.jl:600
[2] include
@ ./Base.jl:419 [inlined]
[3] 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
[4] top-level scope
@ stdin:1
in expression starting at /home/leandro/.julia/packages/RecipesBase/eU0hg/src/RecipesBase.jl:1
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile RecipesBase [3cdcf5f2-1ef4-517c-9805-6587b60abb01] to /home/leandro/.julia/compiled/v1.8/RecipesBase/jl_3UMlMP.
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:1707
[3] compilecache
@ ./loading.jl:1651 [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::Nothing)
@ Base ./loading.jl:1554
[11] top-level scope
@ stdin:1
in expression starting at /home/leandro/.julia/packages/Plots/Hxe7H/src/Plots.jl:1
edit: the issue got solved. After using Plots
, I got a warning saying that GR was not installed, then it installed it and now everything is working. I don’t know why before the dependency was not there.