我尝试
按照以下步骤在 Linux Ubuntu 16.4 上安装 Krita:
sudo add-apt-repository ppa:kubuntu-ppa/backports
sudo apt-get update
sudo apt-get install krita
当我尝试第二个命令(用于更新)时,我得到了这个:
Err:1 http://rs.archive.ubuntu.com/ubuntu xenial InRelease
Could not connect to 172.16.0.3:8080 (172.16.0.3), connection timed out
Err:2 http://rs.archive.ubuntu.com/ubuntu xenial-backports InRelease
Unable to connect to 172.16.0.3:8080:
Err:3 http://rs.archive.ubuntu.com/ubuntu xenial-updates InRelease
Unable to connect to 172.16.0.3:8080:
Err:4 http://archive.canonical.com/ubuntu xenial InRelease
Could not connect to 172.16.0.3:8080 (172.16.0.3), connection timed out
Err:5 http://dl.google.com/linux/chrome/deb stable InRelease
Could not connect to 172.16.0.3:8080 (172.16.0.3), connection timed out
Err:6 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu xenial InRelease
Could not connect to 172.16.0.3:8080 (172.16.0.3), connection timed out
Err:7 http://security.ubuntu.com/ubuntu xenial-security InRelease
Could not connect to 172.16.0.3:8080 (172.16.0.3), connection timed out
Reading package lists... Done
W: Failed to fetch http://rs.archive.ubuntu.com/ubuntu/dists/xenial/InRelease Could not connect to 172.16.0.3:8080 (172.16.0.3), connection timed out
W: Failed to fetch http://rs.archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease Unable to connect to 172.16.0.3:8080:
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease Could not connect to 172.16.0.3:8080 (172.16.0.3), connection timed out
W: Failed to http://archive.canonical.com/ubuntu/dists/xenial/InRelease Could not connect to 172.16.0.3:8080 (172.16.0.3), connection timed out
W: Failed to fetch http://rs.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Unable to connect to 172.16.0.3:8080:
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/InRelease Could not connect to 172.16.0.3:8080 (172.16.0.3), connection timed out
W: Failed to fetch http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/dists/xenial/InRelease Could not connect to 172.16.0.3:8080 (172.16.0.3), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead.
-我没有使用代理
-第一个命令也不起作用:
gpg: keyserver receive failed: keyserver error
- 第三个命令也是如此,但我不会输入有关第三个命令的任何内容,因为我认为主要问题是:
Could not connect to 172.16.0.3:8080 (172.16.0.3), connection timed out
-我尝试了这个(所以我认为防火墙不是问题):
sudo ufw disable
我应该怎么做才能更新操作系统并安装 Krita(或任何其他应用程序)?
答案1
您的 DNS 出现问题。rs.archive.ubuntu.com
应解析为 147.91.175.253,但在您的环境中,您将获得 172.16.0.3,这是 RFC 1918 空间中的一个地址,即旨在在本地网络中使用的地址。进一步查看日志,您将获得 172.16.0.3每一个DNS 查找。
检查您的/etc/resolv.conf
DNS 服务器并查看您使用的是什么。如果您不在可能会给您带来麻烦的公司网络上,请开始使用 Google 的 DNS 服务器 8.8.8.8。如果您使用的是公司网络,请与 IT 人员联系。
答案2
可能是因为 /etc/apt/apt.conf 包含: Acquire::http::Proxy "http://172.16.0.3:8080/";删除其内容后, sudo apt-get update 应该可以正常工作。