Cant use Plots inside tmux

Hello,

seems I cannot load Plots when I open Julia inside a tmux session in PopOS! 20.04 in my local computer:

carlo@pclinux:/media/carlo/tests/$ julia172 
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.7.2 (2022-02-06)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using StructArrays

julia> using Plots
ERROR: InitError: could not load library "/home/xxx/.julia/artifacts/b069ad81d556658ea64a543367e128e535fab269/lib/libgobject-2.0.so"
/home/carlo/.julia/artifacts/b069ad81d556658ea64a543367e128e535fab269/lib/libgobject-2.0.so: undefined symbol: g_uri_ref

In a normal terminal I can open it without issues. Has anyone else faced a similar issue?

My educated guess is that you have LD_LIBRARY_PATH set to some system libraries and that’s making dlopen pick up some conflicting system libraries. You can verify this hypothesis with:

ENV["LD_LIBRARY_PATH"]

If that’s the case, the solution is to start julia with LD_LIBRARY_PATH="" julia

Thank you for the fast answer!
It went exactly as you described. For the record, the terminal had loaded somehow some library paths from the AMD AOCC compiler, which seem to be causing issues. This does not seem to represent a problem when loading the Intel OneAPI ( the MKL lib.) variables.