Hello everyone. I met a problem when install Plots.jl package. The problem is I always failed to precompile a few things. I tried to look it up, but the solution of the past post is not clear enough for me, so I just start this new one. Anyways, here is the error:
(@v1.11) pkg> add Plots
Updating registry at `~/.julia/registries/General.toml`
Resolving package versions...
No Changes to `~/.julia/environments/v1.11/Project.toml`
No Changes to `~/.julia/environments/v1.11/Manifest.toml`
Precompiling project...
β Cairo_jll
β Qt6Base_jll
β HarfBuzz_jll
β Qt6ShaderTools_jll
β libass_jll
β Pango_jll
β Qt6Declarative_jll
β libdecor_jll
β Qt6Wayland_jll
β FFMPEG_jll
β GLFW_jll
β FFMPEG
β GR_jll
β GR
β Plots
β Plots β UnitfulExt
0 dependencies successfully precompiled in 78 seconds. 171 already precompiled.
16 dependencies errored.
For a report of the errors see `julia> err`. To retry use `pkg> precompile`
Based on the replies in other posts, I also check the status of my package and versioninfo() :
But yeah Iβd say first fix those old versions. From your pkg prompt I guess you are dumping all your packages into the default environment, leading to version conflicts. Donβt do that, work in project specific environments instead.
For a quick check on whether thatβs the issue do ] activate --temp and add Plots there
Plots
Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to "/home/zhiyufan/.julia/compiled/v1.11/Plots/jl_2JtyZT".
ERROR: LoadError: InitError: could not load library "/home/zhiyufan/.julia/artifacts/6d8a1f48d4b47dc03fa048d88680be84ae15e5fc/lib/libgobject-2.0.so"
/home/zhiyufan/.julia/artifacts/6d8a1f48d4b47dc03fa048d88680be84ae15e5fc/lib/libgobject-2.0.so: undefined symbol: g_dir_unref
Stacktrace:
[1] dlopen(s::String, flags::UInt32; throw_error::Bool)
@ Base.Libc.Libdl ./libdl.jl:120
[2] dlopen(s::String, flags::UInt32)
@ Base.Libc.Libdl ./libdl.jl:119
[3] macro expansion
@ ~/.julia/packages/JLLWrappers/GfYNv/src/products/library_generators.jl:63 [inlined]
[4] __init__()
@ Glib_jll ~/.julia/packages/Glib_jll/hPWTx/src/wrappers/x86_64-linux-gnu.jl:43
[5] run_module_init(mod::Module, i::Int64)
@ Base ./loading.jl:1378
[6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
@ Base ./loading.jl:1366
[7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}, ignore_native::Nothing; register::Bool)
@ Base ./loading.jl:1254
[8] _include_from_serialized (repeats 2 times)
@ ./loading.jl:1210 [inlined]
[9] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Dict{String, Int64}, DEPOT_PATH::Vector{String})
@ Base ./loading.jl:2057
[10] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:2527
[11] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:2388
[12] #invoke_in_world#3
@ ./essentials.jl:1089 [inlined]
[13] invoke_in_world
@ ./essentials.jl:1086 [inlined]
[14] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:2375
[15] macro expansion
@ ./loading.jl:2314 [inlined]
[16] macro expansion
@ ./lock.jl:273 [inlined]
[17] __require(into::Module, mod::Symbol)
@ Base ./loading.jl:2271
[18] #invoke_in_world#3
@ ./essentials.jl:1089 [inlined]
[19] invoke_in_world
@ ./essentials.jl:1086 [inlined]
[20] require(into::Module, mod::Symbol)
@ Base ./loading.jl:2260
[21] include(mod::Module, _path::String)
@ Base ./Base.jl:557
[22] top-level scope
@ ~/.julia/packages/JLLWrappers/GfYNv/src/toplevel_generators.jl:199
[23] include
@ ./Base.jl:557 [inlined]
[24] 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, UInt128}}, source::String)
@ Base ./loading.jl:2881
[25] top-level scope
@ stdin:6
during initialization of module Glib_jll
in expression starting at /home/zhiyufan/.julia/packages/Cairo_jll/UW7QZ/src/wrappers/x86_64-linux-gnu.jl:4
in expression starting at /home/zhiyufan/.julia/packages/Cairo_jll/UW7QZ/src/Cairo_jll.jl:2
in expression starting at stdin:6
I tried this ] activate --temp, but error remains.
Also I donβt update those packages, because I see this:
Info Packages marked with β and β have new versions available. Those with β may be upgradable, but those with β are restricted by compatibility constraints from upgrading.
This shows that the chain of dynamic libraries is broken on your system. (g_dir_unref should be resolved by another library in the same artifact directory, but some older version of the library has presumably been loaded instead.)
Do you have LD_LIBRARY_PATH or something similar in your environment variables?