GR.jl icon indicating copy to clipboard operation
GR.jl copied to clipboard

'could not load library "libGR.so"' error with Julia 1.4.2 and GR 0.50.1

Open TinusChen opened this issue 4 years ago • 3 comments

Julia 1.4.2 + GR 0.50.1 + MacOS 10.12.6

The full error message is below:

julia> import Pkg julia> Pkg.add("GR")

julia> using GR julia> histogram(randn(10000)) ERROR: could not load library "libGR.so" dlopen(libGR.so.dylib, 1): image not found Stacktrace: [1] clearws at /Users/xxx/.julia/packages/GR/Atztx/src/GR.jl:500 [inlined] [2] plot_data(::Bool) at /Users/xxx/.julia/packages/GR/Atztx/src/jlgr.jl:1094 [3] plot_data at /Users/xxx/.julia/packages/GR/Atztx/src/jlgr.jl:1074 [inlined] [4] histogram(::Array{Float64,1}; kv::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /Users/tinus.chen/.julia/packages/GR/Atztx/src/jlgr.jl:1853 [5] histogram at /Users/tinus.chen/.julia/packages/GR/Atztx/src/jlgr.jl:1847 [inlined] [6] #histogram#11 at /Users/xxx/.julia/packages/GR/Atztx/src/GR.jl:3413 [inlined] [7] histogram(::Array{Float64,1}) at /Users/xxx/.julia/packages/GR/Atztx/src/GR.jl:3413 [8] top-level scope at REPL[3]:1

Try rebuilding GR pkg like this but it did not work. julia> ENV["GRDIR"]="" julia> Pkg.build("GR")

TinusChen avatar Jul 12 '20 07:07 TinusChen

Are you mixing different environments? (/Users/tinus.chen/.julia/... vs. /Users/xxx/.julia/...). You should probably remove all .julia/packages/GR directories and reinstall/rebuild GR.

jheinen avatar Jul 12 '20 15:07 jheinen

Thank you.

It may be imcompleted package. I need rebuild the GR package. firstly, rm -rf “GR” directories, and then Pkg.build("GR")

Then it works.

TinusChen avatar Sep 02 '20 06:09 TinusChen

Hopefully this becomes easier when #314 is resolved.

ViralBShah avatar Oct 15 '20 12:10 ViralBShah