![当我尝试在新的 Debian 上安装 sudo 时出现“无法找到软件包 sudo”](https://linux22.com/image/1524489/%E5%BD%93%E6%88%91%E5%B0%9D%E8%AF%95%E5%9C%A8%E6%96%B0%E7%9A%84%20Debian%20%E4%B8%8A%E5%AE%89%E8%A3%85%20sudo%20%E6%97%B6%E5%87%BA%E7%8E%B0%E2%80%9C%E6%97%A0%E6%B3%95%E6%89%BE%E5%88%B0%E8%BD%AF%E4%BB%B6%E5%8C%85%20sudo%E2%80%9D.png)
我在一台小型 VPS 上安装了新的 Debian,现在当我尝试安装 sudo 时,我只收到此消息。我还尝试将 FTP 服务器添加到列表中,但仍然收到该错误。
root@srv45758:~# vi /etc/apt/sources.list
deb http://ftp.de.debian.org/debian/ jessie main contrib non-free
deb http://ftp.de.debian.org/debian/ main contrib non-free
deb http://security.debian.org jessie/updates main contrib non-free
有人知道这个问题吗?
答案1
验证你的来源这里
尝试使用apt-get install sudo
来获取它。
您可以通过其配置文件来配置用户使用它:
vi /etc/sudoers
add a line:
user ALL=(ALL) ALL
答案2
apt-get update
apt-get install sudo
答案3
添加/etc/apt/sources.list
deb http://deb.debian.org/debian stretch main
deb-src http://deb.debian.org/debian stretch main
然后运行su && apt-get update
。现在打开新的 shell,它就可以使用了