Ubuntu 解决:当执行`sudo apt-get update`命令时 出现的 “apt-get 404 Not Found Package Repository Errors” 问题

Ubuntu 解决:当执行sudo apt-get update或者sudo apt-get install命令是出现的 “apt-get 404 Not Found Package Repository Errors” 问题 和 “E: Some index files failed to download They have been ignored, or old ones used” 问题

W: The repository ‘http://ppa.launchpad.net/ackondro/tibesti/ubuntu xenial Release’ does not have a Release file.
N: Data from such a repository can’t be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/ackondro/tibesti/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

或者

W: The repository ‘http://ppa.launchpad.net/ackondro/tibesti/ubuntu xenial Release’ does not have a Release file.
N: Data from such a repository can’t be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/ackondro/tibesti/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

解决方法

首先,我们将现在出问题的 /etc/apt/sources.list 文件备份一份。(只是一个好习惯而已)

sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup

注: /etc/apt/sources.list 文件 里面存放的是 Linux系统需要的软件源的网站。

接着,我们重新编写一个 /etc/apt/sources.list 文件:

sudo gedit /etc/apt/sources.list

将下面的模板内容,复制粘贴到 /etc/apt/sources.list 文件里面后,保存就可以了:(我们使用的Ubuntu 是16.04)

deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse

源码

deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse

现在,再执行:

sudo apt-get update

1

现在就没有“apt-get 404 Not Found Package Repository Errors” 问题了。

小结:
这个问题,解决方法简单,但是对于初学者来说,却是一个触手的问题。

出现这个问题的原因是: 之前 /etc/apt/sources.list 路径里面的软件源更新网站有的已经过时了,需要更新新的网站。

Unable to connect to cn.archive.ubuntu.com:http: [112.124.140.210 80]

如果你出现这样的错误,说明你的网断了,查看网络连接情况。

参考链接:https://blog.csdn.net/github_35160620/article/details/52115542

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值