Plots is not working

Hello,

I’m failing to use Plots on my work system which runs CentOS 7. When I try using Plots, I get this:

julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
ERROR: LoadError: LoadError: InitError: could not load library "/home/chaposhm/.julia/artifacts/ddfc455343aff48d27c1b39d7fcb07e0d9242b50/lib/libpng16.so"
/lib64/libz.so.1: version `ZLIB_1.2.9' not found (required by /home/chaposhm/.julia/artifacts/ddfc455343aff48d27c1b39d7fcb07e0d9242b50/lib/libpng16.so)
Stacktrace:
 [1] macro expansion
   @ ~/.julia/packages/JLLWrappers/QpMQW/src/products/library_generators.jl:54 [inlined]
 [2] __init__()
   @ libpng_jll ~/.julia/packages/libpng_jll/9vklf/src/wrappers/x86_64-linux-gnu.jl:9
 [3] top-level scope
   @ ~/.julia/packages/JLLWrappers/QpMQW/src/toplevel_generators.jl:188
 [4] top-level scope (repeats 2 times)
   @ none:1
during initialization of module libpng_jll
in expression starting at /home/chaposhm/.julia/packages/Cairo_jll/HW4xi/src/wrappers/x86_64-linux-gnu.jl:6
in expression starting at /home/chaposhm/.julia/packages/Cairo_jll/HW4xi/src/Cairo_jll.jl:2
ERROR: LoadError: LoadError: Failed to precompile Cairo_jll [83423d85-b0ee-5818-9007-b63ccbeb887a] to /home/chaposhm/.julia/compiled/v1.6/Cairo_jll/jl_dbAb9o.
Stacktrace:
 [1] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1385
 [2] top-level scope
   @ ~/.julia/packages/JLLWrappers/QpMQW/src/toplevel_generators.jl:188
 [3] top-level scope (repeats 2 times)
   @ none:1
in expression starting at /home/chaposhm/.julia/packages/HarfBuzz_jll/zavaV/src/wrappers/x86_64-linux-gnu.jl:4
in expression starting at /home/chaposhm/.julia/packages/HarfBuzz_jll/zavaV/src/HarfBuzz_jll.jl:2
ERROR: LoadError: LoadError: Failed to precompile HarfBuzz_jll [2e76f6c2-a576-52d4-95c1-20adfe4de566] to /home/chaposhm/.julia/compiled/v1.6/HarfBuzz_jll/jl_n4VsBO.
Stacktrace:
 [1] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1385
 [2] top-level scope
   @ ~/.julia/packages/JLLWrappers/QpMQW/src/toplevel_generators.jl:188
 [3] top-level scope (repeats 2 times)
   @ none:1
in expression starting at /home/chaposhm/.julia/packages/libass_jll/SaaQW/src/wrappers/x86_64-linux-gnu.jl:6
in expression starting at /home/chaposhm/.julia/packages/libass_jll/SaaQW/src/libass_jll.jl:2
ERROR: LoadError: LoadError: Failed to precompile libass_jll [0ac62f75-1d6f-5e53-bd7c-93b484bb37c0] to /home/chaposhm/.julia/compiled/v1.6/libass_jll/jl_gtuaw4.
Stacktrace:
 [1] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1385
 [2] top-level scope
   @ ~/.julia/packages/JLLWrappers/QpMQW/src/toplevel_generators.jl:188
 [3] top-level scope (repeats 2 times)
   @ none:1
in expression starting at /home/chaposhm/.julia/packages/FFMPEG_jll/ECokx/src/wrappers/x86_64-linux-gnu.jl:4
in expression starting at /home/chaposhm/.julia/packages/FFMPEG_jll/ECokx/src/FFMPEG_jll.jl:2
ERROR: LoadError: Failed to precompile FFMPEG_jll [b22a6f82-2f65-5046-a5b2-351ab43fb4e5] to /home/chaposhm/.julia/compiled/v1.6/FFMPEG_jll/jl_epyNJw.
Stacktrace:
 [1] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1385
 [2] top-level scope (repeats 2 times)
   @ none:1
in expression starting at /home/chaposhm/.julia/packages/FFMPEG/OUpap/src/FFMPEG.jl:1
ERROR: LoadError: Failed to precompile FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] to /home/chaposhm/.julia/compiled/v1.6/FFMPEG/jl_76oFI7.
Stacktrace:
 [1] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1385
 [2] top-level scope (repeats 2 times)
   @ none:1
in expression starting at /home/chaposhm/.julia/packages/Plots/E2187/src/Plots.jl:1
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /home/chaposhm/.julia/compiled/v1.6/Plots/jl_SJIzKz.
Stacktrace:
 [1] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1385

I have Julia 1.6.5.
Any help would be immensely appreciated!

Are you behind some sort of proxy or firewall? Can you try Julia 1.7 or the upcoming 1.8 release candidate (which I think have some changes to downloads)?

1 Like

So are you suggesting that the problem is Julia being out-of-date? Our systems are administrated by another institution so I have to ask them to install Julia 1.7 for me.

Not exactly - Plots works just fine on 1.6.5, and if this is a download issue there’s likely a way around it (and you saying “systems are administered by another institution” increases the odds that it is a Downloads issue).

If it’s not easy for you to check with another Julia version you probably have to wait for someone who knows more about debugging artifact download issues like @mose

1 Like

Did you try a clean environment?

mkdir test
cd test
julia --project="."

and then in Julia:

using Pkg
pkg"add Plots"
1 Like

Thanks! Updating Julia solved the problem!

2 Likes