turtlebot@turtlebot-bot:~$ sudo apt-get update
Err:1 http://ports.ubuntu.com xenial InRelease Could not connect to localhost:9999 (127.0.0.1). - connect (111: Connection refused)
Err:2 http://ports.ubuntu.com xenial-updates InRelease Unable to connect to localhost:9999:
Err:3 http://ports.ubuntu.com xenial-security InRelease Unable to connect to localhost:9999:
Err:4 http://ports.ubuntu.com xenial-backports InRelease Unable to connect to localhost:9999:
Err:5 http://ppa.launchpad.net/flexiondotorg/minecraft/ubuntu xenial InRelease Could not connect to localhost:9999 (127.0.0.1). - connect (111: Connection refused)
Err:6 http://ppa.launchpad.net/ubuntu-mate-dev/welcome/ubuntu xenial InRelease Unable to connect to localhost:9999:
Err:7 http://packages.ros.org/ros/ubuntu xenial InRelease
Could not connect to localhost:9999 (127.0.0.1). - connect (111: Connection refused)
Err:8 http://ppa.launchpad.net/ubuntu-mate-dev/xenial-mate/ubuntu xenial InRelease Unable to connect to localhost:9999:
Err:9 http://ppa.launchpad.net/ubuntu-pi-flavour-makers/ppa/ubuntu xenial InRelease Unable to connect to localhost:9999:
Err:10 http://ppa.launchpad.net/wireshark-dev/stable/ubuntu xenial InRelease
Unable to connect to localhost:9999: Reading package lists... Done
W: Failed to fetch http://ports.ubuntu.com/dists/xenial/InRelease Could not connect to localhost:9999 (127.0.0.1). - connect (111: Connection refused)
W: Failed to fetch http://ports.ubuntu.com/dists/xenial-updates/InRelease Unable to connect to localhost:9999:
W: Failed to fetch http://ports.ubuntu.com/dists/xenial-security/InRelease Unable to connect to localhost:9999:
W: Failed to fetch http://ports.ubuntu.com/dists/xenial-backports/InRelease Unable to connect to localhost:9999:
W: Failed to fetch http://ppa.launchpad.net/flexiondotorg/minecraft/ubuntu/dists/xenial/InRelease Could not connect to localhost:9999 (127.0.0.1). - connect (111: Connection refused)
W: Failed to fetch http://packages.ros.org/ros/ubuntu/dists/xenial/InRelease Could not connect to localhost:9999 (127.0.0.1). - connect (111: Connection refused)
W: Failed to fetch http://ppa.launchpad.net/ubuntu-mate-dev/welcome/ubuntu/dists/xenial/InRelease Unable to connect to localhost:9999:
W: Failed to fetch http://ppa.launchpad.net/ubuntu-mate-dev/xenial-mate/ubuntu/dists/xenial/InRelease Unable to connect to localhost:9999:
W: Failed to fetch http://ppa.launchpad.net/ubuntu-pi-flavour-makers/ppa/ubuntu/dists/xenial/InRelease Unable to connect to localhost:9999:
W: Failed to fetch http://ppa.launchpad.net/wireshark-dev/stable/ubuntu/dists/xenial/InRelease Unable to connect to localhost:9999:
W: Some index files failed to download. They have been ignored, or old ones used instead.
turtlebot@turtlebot-bot:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
附言:我不了解 Stack Exchange 文化。当我在 electronics.stackexchange.com 上发布同样的问题时,我被否决了 5 次,因为这是 turtlebot3-burgerbot 提出的问题。无论如何,我是 Linux 领域的新手,迫切希望找到答案。谢谢。
答案1
错误
Could not connect to localhost:9999 (127.0.0.1). - connect (111: Connection refused)
建议您的系统配置为使用本地 HTTP 代理进行apt
连接(并且没有运行此类代理)。
您可以通过在命令行上传递一个空值来暂时覆盖此设置,Acquire::Http::Proxy=
例如
sudo apt-get -oAcquire::Http::Proxy= update
如果有效的话并且您认为代理配置不合适,然后您可以通过查找并注释掉或删除 apt 配置文件中与代理配置相关的任何行(/etc/apt/apt.conf
以及目录中的相关文件/etc/apt/apt.conf.d/
)以及 HTTP 条目来使设置持久化,您可能会找到 HTTPS 和/或 socks 协议的条目。