我文件夹中有一个程序。我使用 更改了它的权限chmod u+x
。之后,它在终端上无需 sudo 即可运行,但使用 sudo 运行时,它显示error while loading shared libraries: libcudart.so.10.0: cannot open shared object file: No such file or directory
。.so 文件存在于它指向的目录中,但无法使用 sudo 找到。我关注了这个问题可执行文件无需 sudo 即可运行,但使用 sudo 则无法运行但没有运气。请帮忙。我在 Ubuntu 18.04 Server 上运行
我的 /etc/sudoers 文件如下所示
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d