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