Plots.jl: error compiling _plot! could not load library "libGR.so" wrong ELF class: ELFCLASS64

Created on 14 Nov 2019  路  7Comments  路  Source: JuliaPlots/Plots.jl

On Ubuntu 19.4 with Julia from the binaries released on the official web page I get

error compiling _plot!: error compiling _display: could not load library "libGR.so"/home/seba/.julia/packages/GR/f1Iqi/src/../deps/gr/lib/libGR.so: wrong ELF class: ELFCLASS64

when I run using Plots after having run import Pkg; Pkg.add("Plots").

Please ask if you need more info on this!

GR

Most helpful comment

Try

ENV["GRDIR"] = ""
using Pkg; Pkg.build("GR")

All 7 comments

Try

ENV["GRDIR"] = ""
using Pkg; Pkg.build("GR")

The commands passed without error. Rerunning using Plots now works, but calling

x = 1:10; y = rand(10);
plot(x,y)

prints

/home/seba/.julia/packages/GR/f1Iqi/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 Did you start 'gksqt'?
in the console when running this through Emacs and ESS-mode. However, running it in Juno works fine.

Something that might be related is that I also got

ERROR: LoadError: LoadError: InitError: error compiling __init__: could not load library "/home/seba/.julia/packages/Rmath/4wt82/deps/usr/lib/libRmath-julia.so" /home/seba/.julia/packages/Rmath/4wt82/deps/usr/lib/libRmath-julia.so: wrong ELF class: ELFCLASS64

when trying to using Distributions, and running Pkg.build("Rmath") solved that. Could you please explain what is these ELF class errors mean? It seems plausible that I will encounter them again in the future.

Maybe @jheinen can help here.

Could you please check whether all dependencies are installed? For Ubuntu 18.04, pleaser refer to the installation section:

apt install libxt6 libxrender1 libxext6 libgl1-mesa-glx libqt5widgets5

The package names should not have changed significantly compared to the LTS Vwersion ...

Thank you for your response!

I already have those packages installed, unfortunately. I finally decided to circumvent the issue and run Julia in a docker container, which worked out fine.

Had the same problem as in the original issue. The first suggestion by @daschw solved it for me.
I am on Ubuntu Budgie 20.04 using Atom/Juno.

I also experienced this problem

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kleinschmidt picture kleinschmidt  路  3Comments

cortner picture cortner  路  4Comments

Cody-G picture Cody-G  路  4Comments

dancsi picture dancsi  路  4Comments

Cody-G picture Cody-G  路  3Comments