LoadError while precompiling Plots.jl on Ubuntu 18.04

Hello,

I have run into some trouble trying to install the Plots.jl package and I couldn’t find any hints on how to proceed besides nuking my .julia folder which I would like to avoid if at all possible.

Adding the Plots.jl package via add Plots proceeds as normal installing all dependencies, but as soon as the precompilation step is reached, julia throws multiple LoadErrrors (this happened both in 1.5.2 and in 1.6.0, but I will provide the output from 1.6.0).
The first package to fail seems to be Xorg_libxcb_jll with the message

ERROR: The following 1 direct dependency failed to precompile:

Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]

ERROR: LoadError: LoadError: InitError: could not load library "/home/daniel/.julia/artifacts/054d833658de90eb397ffffe590e8fce242fe1e6/lib/libexslt.so"
/usr/lib/x86_64-linux-gnu/libxslt.so.1: version `LIBXML2_1.1.30' not found (required by /home/daniel/.julia/artifacts/054d833658de90eb397ffffe590e8fce242fe1e6/lib/libexslt.so)
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:114
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:114
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/WnWcZ/src/products/library_generators.jl:63 [inlined]
  [4] __init__()
    @ XSLT_jll ~/.julia/packages/XSLT_jll/siCq8/src/wrappers/x86_64-linux-gnu.jl:11
  [5] _include_from_serialized(path::String, depmods::Vector{Any})
    @ Base ./loading.jl:674
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:760
  [7] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:998
  [8] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:914
  [9] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:901
 [10] include(mod::Module, _path::String)
    @ Base ./Base.jl:386
 [11] top-level scope
    @ ~/.julia/packages/JLLWrappers/WnWcZ/src/toplevel_generators.jl:170
 [12] include
    @ ./Base.jl:386 [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::String)
    @ Base ./loading.jl:1213
 [14] top-level scope
    @ none:1
 [15] eval
    @ ./boot.jl:360 [inlined]
 [16] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [17] top-level scope
    @ none:1
during initialization of module XSLT_jll
in expression starting at /home/daniel/.julia/packages/Xorg_libxcb_jll/nMYKH/src/wrappers/x86_64-linux-gnu.jl:4
in expression starting at /home/daniel/.julia/packages/Xorg_libxcb_jll/nMYKH/src/Xorg_libxcb_jll.jl:2

I have already tried updating the libxslt1.1 package, but that did not resolve the issue – generally, I am not sure which packages to update to provide Plots.jl with the right version of the shared object or if this even the right way to go about fixing it.

Maybe someone could point me in the right direction with this?

Many thanks

1 Like

The problem is that something is loading a system library, /usr/lib/x86_64-linux-gnu/libxslt.so.1. How did you install Julia? Does this happen if you try to load julia in a fresh julia session?

2 Likes

How did you install Julia? Does this happen if you try to load julia in a fresh julia session?

I installed Julia by downloading the generic x86_64 Linux tar archive.
In a fresh julia session, I do not observe any problems. I can also install various other packages (such as PlotlyJS.jl for instance to serve as a backend to Plot.jl or Pluto.jl), they precompile just fine and can be used normally. My problem only shows up when I try to add Plots.jl.

I had a similar problem in Fedora. Somehow I had an old

export LD_LIBRARY_PATH=/usr/lib64

in my .bashrc, causing a similar problem. Before that I tried to delete the entire .julia directory, with no luck.

2 Likes

That did actually fix it!
I had completely forgotten that was still in my .bashrc.
Thank you very much!

1 Like

Glad you fixed it!

1 Like