apt update 错误:存储库“http://us.archive.ubuntu.com/ubuntu saucy Release”没有 Release 文件

apt update 错误:存储库“http://us.archive.ubuntu.com/ubuntu saucy Release”没有 Release 文件

我在我的 Ubuntu 16.04 服务器上运行“sudo apt -y update”,但出现以下错误:

# apt -y update                    
Reading package lists... Done                                                                                                       
E: The repository 'http://us.archive.ubuntu.com/ubuntu saucy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://us.archive.ubuntu.com/ubuntu saucy-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@yuyue-HP-Pro-3380-MT:/var/lib/apt# apt -y update
Get:1 http://cn.archive.ubuntu.com/ubuntu xenial InRelease [132 B]
Err:1 http://cn.archive.ubuntu.com/ubuntu xenial InRelease                                                                          
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:2 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease [132 B]                                                          
Err:2 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease                                                                  
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:3 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease [132 B]                                                        
Err:3 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease                                                                
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Ign:4 http://us.archive.ubuntu.com/ubuntu saucy InRelease                                                                           
Hit:5 http://security.ubuntu.com/ubuntu xenial-security InRelease
Ign:6 http://us.archive.ubuntu.com/ubuntu saucy-updates InRelease
Err:7 http://us.archive.ubuntu.com/ubuntu saucy Release
  404  Not Found [IP: 2001:67c:1562::16 80]
Err:8 http://us.archive.ubuntu.com/ubuntu saucy-updates Release
  404  Not Found [IP: 2001:67c:1562::16 80]
Reading package lists... Done
E: The repository 'http://us.archive.ubuntu.com/ubuntu saucy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://us.archive.ubuntu.com/ubuntu saucy-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

这可能是什么原因?我该如何解决这个问题?谢谢!

答案1

发生这种情况是因为sources.list您的机器上仍然有 Ubuntu 13.10 的文件:

您可以sudo -i在终端中使用并将以下内容(完整块)复制并粘贴到其中:

cat > /etc/apt/sources.list << EOF
deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu xenial-proposed restricted main universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu xenial-proposed restricted main universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
EOF

这将覆盖您的/etc/apt/sources.list文件。之后您应该使用exit退出 root 权限。

如果您不希望启用所有软件包源,您可以从设置中的名为“软件和更新”的 GUI 小程序中进行更改。

那么你应该做以下义务:

sudo apt clean
sudo apt update
sudo apt dist-upgrade

答案2

希望我没有迟到

对于可能仍面临相同问题的人来说,上述解决方案对我来说不起作用。就我而言,根目录分区已满(已使用 100%),我使用了

df -h
cd /
du -sch * --exclude=home

检查哪些内容占用了磁盘空间。在我的例子中,根目录中有一个 mysql 数据文件夹的备份,占用了 9.1GB 空间中的约 3.7GB。我所做的就是删除 mysql 文件夹。但要小心删除的内容。

答案3

获取 sources.listUbuntu 源列表生成器/etc/apt/sources.list并用下载的文件 替换您的文件。接下来运行

sudo apt update
sudo apt dist-upgrade

相关内容