sudo: 无法解析主机/su认证失败

博客提到在Ubuntu系统中,使用sudo时出现无法解析主机的错误,同时su认证失败,反映了系统操作中sudo和su命令使用时遇到的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  1. sudo: 无法解析主机:kuochung-20190412
 kuochung@kuochung-20190412:~$ vim /etc/hosts
  1. su 认证失败
sudo passwd
有报错。surongfeng@surongfeng:~$ su 密码: root@surongfeng:/home/surongfeng# sudo apt-get update sudo apt-get install wget gnupg wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/gazebo-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/gazebo-keyring.gpg] http://packages.osrfoundation.org/gazebo/debian-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list 命中:1 http://mirrors.tuna.tsinghua.edu.cn/debian bookworm InRelease 命中:2 http://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates InRelease 命中:3 http://mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports InRelease 命中:4 http://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security InRelease 忽略:5 http://packages.osrfoundation.org/gazebo/debian-stable bookworm InRelease 错误:6 http://packages.osrfoundation.org/gazebo/debian-stable bookworm Release 404 Not Found [IP: 52.52.171.73 80] 正在读取软件包列表... 完成 E: 仓库 “http://packages.osrfoundation.org/gazebo/debian-stable bookworm Release” 没有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 wget 已经是最新版 (1.21.3-1+deb12u1)。 gnupg 已经是最新版 (2.2.40-1.1)。 升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。 --2025-05-14 13:02:56-- https://packages.osrfoundation.org/gazebo.gpg 正在解析主机 packages.osrfoundation.org (packages.osrfoundation.org)... 52.52.171.73 正在连接 packages.osrfoundation.org (packages.osrfoundation.org)|52.52.171.73|:443... 已连接。 已发出 HTTP 请求,正在等待回应... 200 OK 长度:1222 (1.2K) [application/octet-stream] 正在保存至: “/usr/share/keyrings/gazebo-keyring.gpg” /usr/share/keyrings/gazebo-keyring.gpg 100%[=========================================================================>] 1.19K --.-KB/s 用时 0s 2025-05-14 13:02:57 (17.5 MB/s) - 已保存 “/usr/share/keyrings/gazebo-keyring.gpg” [1222/1222]) deb [signed-by=/usr/share/keyrings/gazebo-keyring.gpg] http://packages.osrfoundation.org/gazebo/debian-stable bookworm main root@surongfeng:/home/surongfeng# sudo apt update sudo apt install gazebo 命中:1 http://mirrors.tuna.tsinghua.edu.cn/debian bookworm InRelease 命中:2 http://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates InRelease 命中:3 http://mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports InRelease 命中:4 http://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security InRelease 忽略:5 http://packages.osrfoundation.org/gazebo/debian-stable bookworm InRelease 错误:6 http://packages.osrfoundation.org/gazebo/debian-stable bookworm Release 404 Not Found [IP: 52.52.171.73 80] 正在读取软件包列表... 完成 E: 仓库 “http://packages.osrfoundation.org/gazebo/debian-stable bookworm Release” 没有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 没有可用的软件包 gazebo,但是它被其它的软件包引用了。 这可能意味着这个缺失的软件包可能已被废弃, 或者只能在其他发布源中找到 E: 软件包 gazebo 没有可安装候选 root@surongfeng:/home/surongfeng#
05-15
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值