使用sudo执行命令时报错 error while loading shared libraries: xxx.so.: cannot open shared object file

1.使用sudo命令时加上如下参数,将报错的so库路径加上

sudo env LD_LIBRARY_PATH=/xxx/xxx

2.在/etc/environment文件中添加LD_LIBRARY_PATH="/xxx/xxx"

你可能感兴趣的:(error,while,sudo报错)