当我apt-get update
在 ubuntu 18.04.1 LTS 上运行时,出现以下错误消息
Hit:1 https://download.docker.com/linux/ubuntu bionic InRelease
Err:2 http://ppa.launchpad.net/communitheme/ppa/ubuntu bionic InRelease
504 Gateway Timeout [IP: 135.245.192.7 8000]
Err:3 http://be.archive.ubuntu.com/ubuntu bionic InRelease
504 Gateway Timeout [IP: 135.245.192.7 8000]
Err:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
504 Gateway Timeout [IP: 135.245.192.7 8000]
Err:5 http://be.archive.ubuntu.com/ubuntu bionic-updates InRelease
504 Gateway Timeout [IP: 135.245.192.7 8000]
Err:6 http://be.archive.ubuntu.com/ubuntu bionic-backports InRelease
504 Gateway Timeout [IP: 135.245.192.7 8000]
Reading package lists... Done
W: Failed to fetch http://be.archive.ubuntu.com/ubuntu/dists/bionic/InRelease 504 Gateway Timeout [IP: 135.245.192.7 8000]
W: Failed to fetch http://be.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease 504 Gateway Timeout [IP: 135.245.192.7 8000]
W: Failed to fetch http://be.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease 504 Gateway Timeout [IP: 135.245.192.7 8000]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease 504 Gateway Timeout [IP: 135.245.192.7 8000]
W: Failed to fetch http://ppa.launchpad.net/communitheme/ppa/ubuntu/dists/bionic/InRelease 504 Gateway Timeout [IP: 135.245.192.7 8000]
W: Some index files failed to download. They have been ignored, or old ones used instead.
我不确定哪里出了问题,而且我还没有在 Google 上找到解决方案。这是我的错误吗?我不记得在安装时更改了任何东西。
答案1
不清楚你的网络配置是什么。我的声誉分数不够,无法在评论中询问更多信息,抱歉
看起来类似于apt-get 出现“无法连接”错误:可能存在代理?
我认为 135.245.192.7:8000 是代理服务器和端口。
“网关超时”表示代理正忙。
请换个时间再试。
或者您有机会更改代理吗?
请比较浏览器中的代理设置和当前 APT 设置(可能在/etc/apt/apt.conf
或 中)/etc/apt/apt.conf.d/proxy.conf
。根据您的问题,您可以通过浏览器访问互联网。
以下是 apt 代理的参考
-
Acquire { http::Proxy "http://user:[email protected]:port/"; https::Proxy "http://user:[email protected]:port/"; }```
apt.conf“Acquire::http:Proxy“proxyserver:port”似乎未被使用(Win7 上的 Virtual Box 下的 Ubuntu 13.04)