I recently changed my OS to Ubuntu on my laptop and reinstalled Julia. When trying to plot something, I have the following messages:
julia> using Plots
julia> plot(randn(20))
/home/dcaron/.julia/v0.6/GR/src/../deps/gr/bin/gksqt: error while loading shared libraries: libQt5Widgets.so.5: cannot open shared object file: No such file or directory
connect: Connection refused
GKS: can't connect to GKS socket application
Did you start 'gksqt'?
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
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine FILLAREA
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
On Atom, i am able to display plots, so i am guessing it is a problem related with the package GR.
The GR backend is trying to fall back to Qt4, but you have installed Qt5. Did you do the above-mentioned rebuild of GR.jl after the latest install of Qt5?
although it has an error qt.qpa.xcb: QXcbConnection: XCB error: 146 (Unknown), sequence: 201, resource id: 0, major code: 139 (Unknown), minor code: 20 , but the figure appears successful! thanks!
I tried both of these settings but they give me an error:
ERROR: LoadError: SystemError: opening file "/tmp/jl_CdHheQ.png": No such file or directory
Stacktrace:
[1] systemerror(::String, ::Int32; extrainfo::Nothing) at ./error.jl:168
[2] #systemerror#50 at ./error.jl:167 [inlined]
[3] systemerror at ./error.jl:167 [inlined]
[4] open(::String; read::Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing) at ./iostream.jl:254
[5] open at ./iostream.jl:246 [inlined]
[6] open(::Base.var"#279#280"{String}, ::String; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at ./io.jl:296
[7] open at ./io.jl:296 [inlined]
[8] read at ./io.jl:381 [inlined]
[9] _show(::IOStream, ::MIME{Symbol("image/png")}, ::Plots.Plot{Plots.GRBackend}) at /home/skainswo/.julia/packages/Plots/VA7Vx/src/backends/gr.jl:1970
[10] show at /home/skainswo/.julia/packages/Plots/VA7Vx/src/output.jl:215 [inlined]
[11] png(::Plots.Plot{Plots.GRBackend}, ::String) at /home/skainswo/.julia/packages/Plots/VA7Vx/src/output.jl:7
[12] frame(::Plots.Animation, ::Plots.Plot{Plots.GRBackend}) at /home/skainswo/.julia/packages/Plots/VA7Vx/src/animation.jl:20
[13] frame(::Plots.Animation) at /home/skainswo/.julia/packages/Plots/VA7Vx/src/animation.jl:18
[14] top-level scope at /home/skainswo/dev/research/julia/odecontrol/diffdrive/train.jl:89
[15] include(::Module, ::String) at ./Base.jl:377
[16] exec_options(::Base.JLOptions) at ./client.jl:288
[17] _start() at ./client.jl:484
in expression starting at /home/skainswo/dev/research/julia/odecontrol/diffdrive/train.jl:48
julia> plot(rand(10))
/home/affans/.julia/packages/GR/Atztx/src/../deps/gr/bin/gksqt: error while loading shared libraries: libQt5Widgets.so.5: 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
Setting ENV["GKSwstype"] = "nul" or ENV["GKSwstype"] = "140" works but plot(rand(10)) dosn’t really do anything (I am using an X-server to pop up the image from my server to local). So anyway I can get this to work on a server (without sudo access, so can’t install Qt5Widgets.so.5) and with x-forwarding?