sources.list更正,从Ubuntu 19.04升级到19.10 /“旧版本”

时间:2020-10-26 02:26:47

标签: apt ubuntu-19.04

$ cat /etc/apt/sources.list
## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
##     or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb https://old-releases.ubuntu.com/releases/ focal main restricted
deb-src https://old-releases.ubuntu.com/releases/ focal main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb https://old-releases.ubuntu.com/releases/ focal-updates main restricted
deb-src https://old-releases.ubuntu.com/releases/ focal-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb https://old-releases.ubuntu.com/releases/ focal universe
deb-src https://old-releases.ubuntu.com/releases/ focal universe
deb https://old-releases.ubuntu.com/releases/ focal-updates universe
deb-src https://old-releases.ubuntu.com/releases/ focal-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb https://old-releases.ubuntu.com/releases/ focal multiverse
deb-src https://old-releases.ubuntu.com/releases/ focal multiverse
deb https://old-releases.ubuntu.com/releases/ focal-updates multiverse
deb-src https://old-releases.ubuntu.com/releases/ focal-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb https://old-releases.ubuntu.com/releases/ focal-backports main restricted universe multiverse
deb-src https://old-releases.ubuntu.com/releases/ focal-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu focal-security main restricted
deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
deb-src http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse
deb-src http://security.ubuntu.com/ubuntu focal-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb https://old-releases.canonical.com/ubuntu wily partner
# deb-src https://old-releases.canonical.com/ubuntu wily partner

这是我尝试更新时得到的:

$ sudo apt update
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Ign:2 https://old-releases.ubuntu.com/releases focal InRelease
Ign:3 https://old-releases.ubuntu.com/releases focal-updates InRelease
Ign:4 https://old-releases.ubuntu.com/releases focal-backports InRelease
Err:5 https://old-releases.ubuntu.com/releases focal Release
  404  Not Found [IP: 91.189.91.124 443]
Err:6 https://old-releases.ubuntu.com/releases focal-updates Release
  404  Not Found [IP: 91.189.91.124 443]
Err:7 https://old-releases.ubuntu.com/releases focal-backports Release
  404  Not Found [IP: 91.189.91.124 443]
Reading package lists... Done
E: The repository 'https://old-releases.ubuntu.com/releases 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 'https://old-releases.ubuntu.com/releases focal-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.
E: The repository 'https://old-releases.ubuntu.com/releases focal-backports 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.

接下来,我要运行apt dist-upgrade。我不确定sources.list.distUpgrade是否会由apt自动更新,或者是否也需要更正。这是我目前拥有的:

$ cat /etc/apt/sources.list.distUpgrade
## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
##     or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl

# See https://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic main restricted
deb-src https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic-updates main restricted
deb-src https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic universe
deb-src https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic universe
deb https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic-updates universe
deb-src https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic multiverse
deb-src https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic multiverse
deb https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic-updates multiverse
deb-src https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic-backports main restricted universe multiverse
deb-src https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic-backports main restricted universe multiverse

deb https://security.ubuntu.com/ubuntu cosmic-security main restricted
deb-src https://security.ubuntu.com/ubuntu cosmic-security main restricted
deb https://security.ubuntu.com/ubuntu cosmic-security universe
deb-src https://security.ubuntu.com/ubuntu cosmic-security universe
deb https://security.ubuntu.com/ubuntu cosmic-security multiverse
deb-src https://security.ubuntu.com/ubuntu cosmic-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb https://archive.canonical.com/ubuntu wily partner
# deb-src https://archive.canonical.com/ubuntu wily partner

1 个答案:

答案 0 :(得分:0)

不存在任何有关/etc/apt/sources.list内容更改的文档。经过反复试验,到目前为止,以下内容是正确的。

## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
##     or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ focal main restricted
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ focal universe
deb-src http://archive.ubuntu.com/ubuntu/ focal universe
deb http://archive.ubuntu.com/ubuntu/ focal-updates universe
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu/ focal multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu focal-security main restricted
deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
deb-src http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse
deb-src http://security.ubuntu.com/ubuntu focal-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu wily partner
# deb-src http://archive.canonical.com/ubuntu wily partner