【问题标题】:Getting error, when i try "sudo apt-get update" [closed]当我尝试“sudo apt-get update”时出现错误[关闭]
【发布时间】:2022-01-11 05:09:09
【问题描述】:

我现在再次安装了 Ubuntu 18.04。之后,我尝试了更新和升级命令。升级命令执行得很好。但是,更新命令没有执行并给出错误输出。您可以在以下位置查看错误:

sudo apt-get update
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Err:2 http://tr.archive.ubuntu.com/ubuntu bionic InRelease         
  Could not resolve 'tr.archive.ubuntu.com'
Err:3 http://tr.archive.ubuntu.com/ubuntu bionic-updates InRelease
  Could not resolve 'tr.archive.ubuntu.com'
Err:4 http://tr.archive.ubuntu.com/ubuntu bionic-backports InRelease
  Could not resolve 'tr.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://tr.archive.ubuntu.com/ubuntu/dists/bionic/InRelease  Could not resolve 'tr.archive.ubuntu.com'
W: Failed to fetch http://tr.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease  Could not resolve 'tr.archive.ubuntu.com'
W: Failed to fetch http://tr.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease  Could not resolve 'tr.archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

【问题讨论】:

标签: bash ubuntu ubuntu-18.04 apt apt-get


【解决方案1】:

服务器 tr.archive.ubuntu.com 目前不可用,如果您尝试在浏览器中访问它,则会收到 404 错误。您可能可以从 /etc/apt/sources.list 中 archive. 前面的 tr. 删除,您的命令将起作用。

你可以像这样用你的文本编辑器(纳米只是一个例子)来做到这一点

sudo nano /etc/apt/sources.list

或者你可以像这样使用 sed

sudo sed -i 's|http://tr.|http://|' /etc/apt/sources.list

【讨论】:

    猜你喜欢
    • 2023-01-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-14
    • 1970-01-01
    • 2019-10-05
    相关资源
    最近更新 更多