Ubuntu 19.04 неверный sources.list

Я сделал обновление Ubuntu на WSL с 18.10 по 19.04 с do-release-upgrade.

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="19.04 (Disco Dingo)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 19.04"
VERSION_ID="19.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=disco
UBUNTU_CODENAME=disco

Но теперь я замечаю, что репозитории / sources.list по-прежнему указывают на космическое.

$ grep -li cosmic /etc/apt/sources.list /etc/apt/sources.list* /etc/apt/sources.list*/*
/etc/apt/sources.list
/etc/apt/sources.list
grep: /etc/apt/sources.list.d: Is a directory
/etc/apt/sources.list.distUpgrade
/etc/apt/sources.list.save


$ grep -li disco /etc/apt/sources.list /etc/apt/sources.list* /etc/apt/sources.list*/*
grep: /etc/apt/sources.list.d: Is a directory 

Так что я полагаю, что во время обновления что-то не получилось, чего я не заметил.

Как я могу выявить любые ошибки обновления и исправить их?
Где я могу найти список источников для 19.04?

4
задан 4 May 2019 в 12:06

3 ответа

Где я могу найти список источников для 19.04?

Необходимые шаги:

  • Выполнить эти команды только в консоли WSL. В противном случае права доступа к файлу / папке будут неправильными. Также используйте chmod для исправления любого разрешения на файл.
  • Откройте веб-сайт облачных образов Ubuntu: https://cloud-images.ubuntu.com/releases/19.04/release/
  • Загрузите файл ubuntu-19.04-server-cloudimg-amd64-root.TAR.XZ. Потому что он меньше других;)
  • Извлеките папку /etc/apt с помощью команды tar -xvf ubuntu-19.04-server-cloudimg-amd64-root.tar.xz etc/apt. Не добавляйте косую черту в путь к папке.
  • Теперь скопируйте файл sources.list или любые другие необходимые файлы.
0
ответ дан 4 May 2019 в 12:06

Если Вы просто хотите обновить свое существующее sources.list для указания на новый дистрибутив после того, как Вы уже обновили, можно сделать это:

Предупреждение : Действуйте осторожно! Всегда копируйте свой файл сначала.

sudo sed -i "s/cosmic/$(lsb_release -cs)/" /etc/apt/sources.list

форма эти sed команда: "s/<old value>/<new value>/"

Для резервного копирования файла сначала можно просто сделать: sudo cp /etc/apt/sources.list ~/

можно также видеть этот ответ для идеи того, на что эти sources.list должен быть похожим:

, Каков корректный вывод кошки/etc/apt/sources.list?

1
ответ дан 25 October 2019 в 12:22

Следуя ответу @Biswaprio, здесь я поместил содержимое файла sources.list для Ubuntu 19.04, чтобы другим не нужно было заново проходить весь процесс.

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

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ disco-updates main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ disco-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/ disco universe
# deb-src http://archive.ubuntu.com/ubuntu/ disco universe
deb http://archive.ubuntu.com/ubuntu/ disco-updates universe
# deb-src http://archive.ubuntu.com/ubuntu/ disco-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/ disco multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ disco multiverse
deb http://archive.ubuntu.com/ubuntu/ disco-updates multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ disco-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/ disco-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ disco-backports main restricted universe 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 disco partner
# deb-src http://archive.canonical.com/ubuntu disco partner

deb http://security.ubuntu.com/ubuntu/ disco-security main restricted
# deb-src http://security.ubuntu.com/ubuntu/ disco-security main restricted
deb http://security.ubuntu.com/ubuntu/ disco-security universe
# deb-src http://security.ubuntu.com/ubuntu/ disco-security universe
deb http://security.ubuntu.com/ubuntu/ disco-security multiverse
# deb-src http://security.ubuntu.com/ubuntu/ disco-security multiverse
2
ответ дан 13 May 2020 в 04:58

Другие вопросы по тегам:

Похожие вопросы: