Ubuntu 20.04 的存储库没有发布文件错误

Ubuntu 20.04 的存储库没有发布文件错误

我理解“存储库没有发布文件”是旧的不受支持的版本的常见错误。但我在受支持的版本中遇到了此错误。我尝试在 /etc/apt/sources.list 中将“in.archive...”更改为“old-releases...”。但我仍然收到错误。以下是我的输出。

    sambeet@Polya:~$ sudo apt-get update
Ign:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Ign:2 http://old-releases.ubuntu.com/ubuntu focal InRelease                                       
Ign:3 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease                                 
Err:4 http://security.ubuntu.com/ubuntu focal-security Release                                     
  Could not handshake: An unexpected TLS packet was received. [IP: 10.10.78.62 3128]
Err:5 http://old-releases.ubuntu.com/ubuntu focal Release                                          
  Could not handshake: An unexpected TLS packet was received. [IP: 10.10.78.62 3128]
Ign:6 http://in.archive.ubuntu.com/ubuntu focal InRelease                                         
Ign:7 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease                               
Err:8 http://in.archive.ubuntu.com/ubuntu focal-updates Release
  Could not handshake: An unexpected TLS packet was received. [IP: 10.10.78.62 3128]
Err:9 http://in.archive.ubuntu.com/ubuntu focal Release
  Could not handshake: An unexpected TLS packet was received. [IP: 10.10.78.62 3128]
Err:10 http://in.archive.ubuntu.com/ubuntu focal-backports Release
  Could not handshake: An unexpected TLS packet was received. [IP: 10.10.78.62 3128]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu focal-security Release' no longer has 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://old-releases.ubuntu.com/ubuntu focal 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://in.archive.ubuntu.com/ubuntu focal-updates Release' no longer has 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://in.archive.ubuntu.com/ubuntu focal Release' no longer has 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://in.archive.ubuntu.com/ubuntu focal-backports Release' no longer has 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.
sambeet@Polya:~$ 

如您所见,我将一个网站更改为“http://old-releases..”,但即使这样也显示没有发布文件错误。有人可以提出一些解决方法吗?这是我的发布信息。

sambeet@Polya:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:    20.04
Codename:   focal

答案1

我找到了问题所在。问题在于 apt 不使用系统代理,我必须在 /etc/apt/apt.conf.d/proxy.conf 中创建一个 proxy.conf 文件,然后按照以下步骤添加代理。但错误消息需要更具体。我还想知道是否有任何方法可以让 apt 使用系统范围的代理。顺便说一下,在 ubuntu 20.04 中有三个地方应该指定代理...

  1. 在 /etc/environment 中,curl 可以正常工作

  2. 在 /etc/apt/apt.conf.d/proxy.conf 中(如果不存在则创建该文件)以使 apt 正常工作

  3. 在 /var/snap/cannonical-livepatch/config 中,livepatch 可以正常工作

相关内容