GLMakie libgobject-2.0.so error

hi
I’m working on ubuntu 20.04 and try to use GLMakie but get the following error:

ERROR: LoadError: InitError: could not load library "libgobject-2.0.so"
libgobject-2.0.so: undefined symbol: g_uri_ref

when runing:

using Libdl
filter!(lib -> occursin("glib", lib), dllist())

I get:

String[]

How can i fix this?
thanks
daniel

Can you please show Libdl.dllist() after you try to load the package, in the same session where loading fails? My educated guess is that you’re loading some system libraries. Also, how did you install Julia?

hi this is the output :

linux-vdso.so.1
/usr/lib/x86_64-linux-gnu/libdl.so.2
/usr/lib/x86_64-linux-gnu/libpthread.so.0
/usr/lib/x86_64-linux-gnu/libc.so.6
/julia-1.8.3/bin/../lib/libjulia.so.1
/lib64/ld-linux-x86-64.so.2
/julia-1.8.3/bin/../lib/julia/libgcc_s.so.1
/julia-1.8.3/bin/../lib/julia/libopenlibm.so
/julia-1.8.3/bin/../lib/julia/libjulia-internal.so.1
/usr/lib/x86_64-linux-gnu/libunwind.so.8
/usr/lib/x86_64-linux-gnu/librt.so.1
/usr/lib/x86_64-linux-gnu/libz.so.1
/usr/lib/x86_64-linux-gnu/libatomic.so.1
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/usr/lib/x86_64-linux-gnu/libm.so.6
/usr/lib/x86_64-linux-gnu/liblzma.so.5
/julia-1.8.3/bin/../lib/julia/libjulia-codegen.so.1
/julia-1.8.3/bin/../lib/julia/libLLVM-13jl.so
/julia-1.8.3/lib/julia/sys.so
/usr/lib/x86_64-linux-gnu/libpcre2-8.so
/julia-1.8.3/bin/../lib/julia/libgmp.so
/julia-1.8.3/bin/../lib/julia/libmpfr.so
/julia-1.8.3/bin/../lib/julia/libopenblas64_.so
/julia-1.8.3/bin/../lib/julia/libgfortran.so.5
/julia-1.8.3/bin/../lib/julia/libquadmath.so.0
/julia-1.8.3/bin/../lib/julia/libblastrampoline.so
/julia-1.8.3/bin/../lib/julia/libcholmod.so
/julia-1.8.3/bin/../lib/julia/libamd.so.2
/julia-1.8.3/bin/../lib/julia/libcolamd.so.2
/julia-1.8.3/bin/../lib/julia/libsuitesparseconfig.so.5
/julia-1.8.3/bin/../lib/julia/libccolamd.so.2
/julia-1.8.3/bin/../lib/julia/libcamd.so.2
/usr/lib/x86_64-linux-gnu/libnghttp2.so.14
/julia-1.8.3/bin/../lib/julia/libcurl.so
/julia-1.8.3/bin/../lib/julia/libssh2.so.1
/julia-1.8.3/bin/../lib/julia/libmbedtls.so.14
/julia-1.8.3/bin/../lib/julia/libmbedx509.so.1
/julia-1.8.3/bin/../lib/julia/libmbedcrypto.so.7
/.julia/artifacts/9cfa1f93276d8e380806650071f8447e8e38301f/lib/libearcut.so
/.julia/artifacts/7661e5a9aa217ce3c468389d834a4fb43b0911e8/lib/libbz2.so
/.julia/artifacts/54c97eb1b0a6f74bac96297a815ddec2204a7db7/lib/libfreetype.so
/usr/lib/x86_64-linux-gnu/libgomp.so.1
/.julia/artifacts/abf4b5086b4eb867021118c85b2cc11a15b764a9/lib/libopenspecfun.so
/.julia/artifacts/d11639e2a53726f2593e25ba98ed7b416f62bbc5/lib/libfribidi.so
/.julia/artifacts/e63503984ff7722ba80209eddd5621acca0d2d5e/lib/libcharset.so
/.julia/artifacts/e63503984ff7722ba80209eddd5621acca0d2d5e/lib/libiconv.so
/.julia/artifacts/d00220164876dea2cb19993200662745eed5e2db/lib/libffi.so
/.julia/artifacts/f792596249694cc12db3689d386d3a6c5d24e794/lib/libxml2.so
/.julia/artifacts/dc526f26fb179a3f68eb13fcbe5d2d2a5aa7eeac/lib/libgettextlib.so
/.julia/artifacts/5a508a62784097dab7c7ae5805f2c89d2cc97397/lib/libmount.so
/usr/lib/x86_64-linux-gnu/libblkid.so.1
/.julia/artifacts/1cfe0ebb804cb8b0d7d1e8f98e5cda94b2b31b3d/lib/libgio-2.0.so
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
/usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0
/usr/lib/x86_64-linux-gnu/libresolv.so.2
/usr/lib/x86_64-linux-gnu/libpcre.so.3
/usr/lib/x86_64-linux-gnu/libffi.so.7
/.julia/artifacts/1cfe0ebb804cb8b0d7d1e8f98e5cda94b2b31b3d/lib/libglib-2.0.so
/.julia/artifacts/1cfe0ebb804cb8b0d7d1e8f98e5cda94b2b31b3d/lib/libgmodule-2.0.so

because I’m on ubuntu I downloaded it from the web and add ls to /usr/bin as “julia”

thank

It isn’t clear to me what you did exactly: where did you download it from?

hi,
I downloaded it from the official julia web page, save at “/home/” and added a symbolic link at “/usr/bin” to be able to call julia anywhere.

Is creating the symlink to /usr/local/bin (which is a more sensible idea for “custom” software you’re installing without your package manager) any better? Also, you may want to use juliaup instead of manually managing the julia installation (and only one at a time) yourself.

I reinstall julia using ‘juliaup’ and run instantiate, unfortunately I still get the same errors

 Precompiling project...
  ✗ Cairo_jll
  ✗ HarfBuzz_jll
  ✗ libass_jll
  ✗ FFMPEG_jll
  ✗ FFMPEG
  ✗ Makie
  ✗ GLMakie
  197 dependencies successfully precompiled in 84 seconds
  7 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages

and the same lib error is popping up :frowning:

Failed to precompile GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a] to /home/.julia/compiled/v1.8/GLMakie/jl_qnpWVH.
ERROR: LoadError: InitError: could not load library "/home/.julia/artifacts/1cfe0ebb804cb8b0d7d1e8f98e5cda94b2b31b3d/lib/libgobject-2.0.so"
/home/.julia/artifacts/1cfe0ebb804cb8b0d7d1e8f98e5cda94b2b31b3d/lib/libgobject-2.0.so: undefined symbol: g_uri_ref

Uhm, do you have the environment variable LD_LIBRARY_PATH set?

hi,
I don’t know…
What do I need to check and how to set it?

Inside Julia:

ENV["LD_LIBRARY_PATH"]

It looks like this issue is solved here