Hi there,
I’m using Ubuntu 20.04 and julia 1.5.2.
I’m trying to use Plots. When typing
using Plots
the julia terminal raises no complaints. Then I tried
plot(1:3, 1:3)
and got the message
/home/inbar/.julia/packages/GR/BwGt2/src/../deps/gr/bin/gksqt: error while loading shared libraries: libQtGui.so.4: cannot open shared object file: No such file or directory
connect: Connection refused
GKS: can't connect to GKS socket application
GKS: Open failed in routine OPEN_WS
GKS: GKS not in proper state. GKS must be either in the state WSOP or WSAC in routine ACTIVATE_WS
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine FILLAREA
and tens of other lines like the last one, with different routines. After that I tried running
gr()
and plot again, resulting in the first part of the message to disappear and the part with the routine failures to remain.
What do I do wrong? Plots is a basic package, it doesn’t supposed to be that complicated to use it, is it?
Thanks in advance.
I cannot replicate this. Try restarting (a) the REPL and doing
julia> using Pkg
julia> Pkg.update()
julia> using Plots
julia> plot(1:3, 1:3)
if that does not work restart your machine, and try it again (without doing anything else first). If you still get the same error or some other error, let us see it and also show us what versioninfo()
prints.
using Pkg raised no remarks. Then:
julia> Pkg.update()
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
┌ Warning: Some registries failed to update:
│ — /home/inbar/.julia/registries/General — failed to fetch from repo
└ @ Pkg.Types /buildworker/worker/package_linux32/build/usr/share/julia/stdlib/v1.5/Pkg/src/Types.jl:1194
No Changes to `~/.julia/environments/v1.5/Project.toml`
No Changes to `~/.julia/environments/v1.5/Manifest.toml`
julia> using Plots
julia> plot(1:3, 1:3)
/home/inbar/.julia/packages/GR/BwGt2/src/../deps/gr/bin/gksqt: error while loading shared libraries: libQtGui.so.4: cannot open shared object file: No such file or directory
connect: Connection refused
GKS: can't connect to GKS socket application
GKS: Open failed in routine OPEN_WS
GKS: GKS not in proper state. GKS must be either in the state WSOP or WSAC in routine ACTIVATE_WS
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine FILLAREA
and so on tens of the like lines. Also after restart.
julia> versioninfo()
Julia Version 1.5.2
Commit 539f3ce943 (2020-09-23 23:17 UTC)
Platform Info:
OS: Linux (i686-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz
WORD_SIZE: 32
LIBM: libopenlibm
LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
I add that in ~/.julia/packages/GR have only two folders: BwGt2 and cRdXQ. I saw somewhere a comment about a folder named crXzk, maybe it has some relevance?
It is not ok that update
does not work. That indicates a problem which can have many ramifications, none easy to know. You could try Pkg.resolve()
… though its a long shot. You are better off removing some of the installation, and putting it back fresh but I am not the person to guide you for that.
1 Like
People in https://github.com/JuliaPlots/Plots.jl/issues/1649 report that adding qt5 solves that issue
2 Likes