我是 Linux 新手,我使用的是 Ubuntu 20.04.2.0 LTS。我正在尝试按照以下步骤安装 git这地点。当我运行sudo apt update
或sudo apt-get update
命令返回此错误时:
须藤apt更新
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]
Hit:2 http://dl.google.com/linux/chrome/deb stable InRelease
Err:3 http://tr.archive.ubuntu.com/ubuntu focal InRelease
Temporary failure resolving 'tr.archive.ubuntu.com'
Err:4 http://tr.archive.ubuntu.com/ubuntu focal-updates InRelease
Temporary failure resolving 'tr.archive.ubuntu.com'
Err:5 http://tr.archive.ubuntu.com/ubuntu focal-backports InRelease
Temporary failure resolving 'tr.archive.ubuntu.com'
Fetched 109 kB in 36s (3.074 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://tr.archive.ubuntu.com/ubuntu/dists/focal/InRelease Temporary failure resolving 'tr.archive.ubuntu.com'
W: Failed to fetch http://tr.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Temporary failure resolving 'tr.archive.ubuntu.com'
W: Failed to fetch http://tr.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease Temporary failure resolving 'tr.archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
我也尝试过sudo apt-get update
我也尝试过这解决方案https://askubuntu.com/但更改 DNS 并没有解决我的问题Temporary failure resolving 'tr.archive.ubuntu.com'
,根据此解决方案的第二部分,我将从deb http:/archive.canonical.com/ natty backports
我的中删除行source.list
,但我已经没有这个了。
我的来源.list
答案1
由于 ping 失败,服务器似乎已关闭:
ping tr.archive.ubuntu.com
最简单的规避方法是直接使用archive.ubuntu.com
,即删除tr.
前缀。
Ubuntu 档案通常有一个本地镜像,以减轻主服务器上的负载,并出于速度原因减少全球流量。tr.
无法说明为什么镜子会关闭以及这是否是永久性的。通常他们应该工作。