sudo apt-get update :无法连接到 localhost:9999 (127.0.0.1)。- 连接(111:连接被拒绝)

suj*_*eet 2 updates apt sudo localhost

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
Run Code Online (Sandbox Code Playgroud)

PS:我不知道堆栈交换文化。当我在electronics.stackexchange.com 上发表同样的问题时,我被 5 票否决了,因为这是来自turtlebot3-burgerbot 的问题。无论如何,我是 Linux 领域的新手,迫切希望找到答案。谢谢你。

ste*_*ver 6

错误

Could not connect to localhost:9999 (127.0.0.1). - connect (111: Connection refused)
Run Code Online (Sandbox Code Playgroud)

建议您的系统配置为使用本地 HTTP 代理进行apt连接(并且没有此类代理正在运行)。

您可以通过在命令行上传递一个空值来临时覆盖命令行上的此设置,Acquire::Http::Proxy=例如

sudo apt-get -oAcquire::Http::Proxy= update
Run Code Online (Sandbox Code Playgroud)

如果这样的作品,你认为代理配置是不合适的- ,那么你可以通过定位,要么注释掉或删除您的容易的配置文件相关的代理配置任何线路进行设置永久/etc/apt/apt.conf的和相关的文件/etc/apt/apt.conf.d/目录-以及HTTP 的条目您可能会找到 HTTPS 和/或袜子协议的条目。