If I start Julia with:
LD_LIBRARY_PATH="" LD_PRELOAD="" Julia
then the output of:
using Libdl
filter!(lib -> occursin("glib", lib), dllist())
is:
String[]
This is consistent with what should happen when clearing the LD_LIBRARY_PATH env variable. I have discovered the reason why I was getting the error before. The LD_LIBRARY_PATH variable was being set improperly (or not at all). Prepending /lib to LD_LIBRARY_PATH solved my problem.