debian 系 error while loading shared libraries: libgobject-2.0.so.0: cannot open shared object file: No such file or directory 的解决方法
问题
error while loading shared libraries: libgobject-2.0.so.0: cannot open shared object file: No such file or directory
apt update
apt install libglib2.0-0
apt install locate
locate libgobject-2.0.so.0
root@9822177009b1:/# locate libgobject-2.0.so.0
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.6600.8
将下述内容保存到 ~/.bashrc
或 /etc/profile
(需要按实际环境更改)
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
临时使用
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH MY_COMMAND