Failed to fetch http://packages.ros.org/ros2/ubuntu/pool/main/r/ros-humble-usb-cam/ros-humble-usb-cam 0.8.0-1jammy.20240217.095540 amd64.debTemporary failure resolving 'packages.ros.org'
E: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/pool/universe/p/pocketsphinx/pocketsphinx-en-us 0.8.0%2breal5prealpha%2b1-14ubuntu1 all.deb Temporary failure resolving 'cn.archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
=========================
原因可能是DNS服务器错误。
解决方案:
sudo vi /etc/resolv.conf
添加
nameserver 114.114.114.114
修改后保存,然后执行以下命令使修改生效
sudo resolvconf -u
然后再执行 sudo apt install
参考:
Linux001 | 我走过的弯路之二——Ubuntu 22.04 系统中 ‘Temporary failure resolving‘ 解决方案-CSDN博客
Temporary failure resolving——Ubuntu DNS未配置报错与解决-CSDN博客