gpt4 book ai didi

linux - 当我尝试通过 SSH 检查 Linux Live Server 上的 Sudo 版本时出错

转载 作者:太空宇宙 更新时间:2023-11-04 06:01:41 24 4
gpt4 key购买 nike

我收到此错误

-bash: sudo: command not found

尝试使用以下命令检查 Sudo 的版本

sudo -V

这是它的屏幕截图:screenshotofbasherror--bash: sudo: command not found

提前致谢!

最佳答案

原因可能是你没有 sudo 包。

对我来说,操作系统是 CentOS-7.2,我从 sudo rpm 包中获取 sudo 命令。这可以通过以下命令完成:

yum provides /usr/bin/sudo

当您输入上面的命令时,您可以获得以下输出:

sudo-1.8.19p2-13.el7.x86_64 : Allows restricted root access for specified users
Repo : base
Matched from:
Filename : /usr/bin/sudo



sudo-1.8.6p7-17.el7_2.x86_64 : Allows restricted root access for specified users
Repo : @updates
Matched from:
Filename : /usr/bin/sudo

并且我可以查询sudo rpm包

sudo-1.8.6p7-17.el7_2.x86_64

关于linux - 当我尝试通过 SSH 检查 Linux Live Server 上的 Sudo 版本时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50963017/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com