Как редактировать/восстанавливать 'sources.list' файл

Как я могу восстановиться sources.list который имеет катастрофический отказ, и я не могу сделать никакого обновления программного обеспечения. Когда я нажимаю на значок обновления, я не получаю ответа. Я пытаюсь отредактировать sources.list файл “vi” редактор не работал. Я был попыткой ввести следующую строку в “программное обеспечение Updater”:

deb http://deb.torproject.org/torproject.org trusty main
deb-src http://deb.torproject.org/torproject.org trusty main

Буду признателен, если можно помочь мне; я не хорош в использовании терминала.

2
задан 24 July 2015 в 17:04

3 ответа

Значение по умолчанию sources.list файл на 14,04:

# deb http://be.archive.ubuntu.com:80/ubuntu/ trusty main restricted

# deb http://be.archive.ubuntu.com:80/ubuntu/ trusty-updates main restricted
# deb http://security.ubuntu.com/ubuntu trusty-security main restricted

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

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

deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-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 trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner

## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
# deb http://extras.ubuntu.com/ubuntu trusty main
# deb-src http://extras.ubuntu.com/ubuntu trusty main

местоположение файла: /etc/apt/source.list

можно отредактировать его путем издания sudo vi /etc/apt/source.list, или sudo nano /etc/apt/source.list (нано мог бы быть легче для Вас).

, Если Вы хотите добавить те упомянутые репозитории, необходимо добавить эти строки к нижней части файла:

# Tor Project Repositories
deb http://deb.torproject.org/torproject.org trusty main
deb-src http://deb.torproject.org/torproject.org trusty main
1
ответ дан 2 December 2019 в 03:52

Просто удалите файл sources.list

sudo rm /etc/apt/sources.list

или сделайте резервное копирование, если Вы не делаете , доверяют мне .

sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak

После этого

  1. Запускают программное обеспечение & Обновления через Тире
  2. Единицы Нажимают на флажок Канонически поддерживаемое бесплатное программное обеспечение и программное обеспечение с открытым исходным кодом (основной)
  3. Вводит Ваш пароль
  4. Близко диалоговое окно

, и у Вас будет новый файл

0
ответ дан 2 December 2019 в 03:52

Примечание:

По умолчанию можно найти резервное копирование этого файла в /etc/apt, dir звонил sources.list.save

, Таким образом, можно использовать его для восстановления потерянного.

sudo cp /etc/apt/sources.list.save /etc/apt/sources.list

Еще, если у Вас нет этого файла, можно посетить эту ссылку: http://repogen.simplylinux.ch/ Вводит Вашу информацию, и Вы получите свое специализированное sources.list файл Для набора по умолчанию репозиториев, необходимо включить эти репозитории.

  1. Все репозитории Ответвлений Ubuntu.
  2. безопасность - Важные Обновления системы защиты.
  3. Исходный Репозиторий безопасности
  4. Обновления - Рекомендуемые Обновления
  5. Исходный Репозиторий Обновлений
1
ответ дан 2 December 2019 в 03:52

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

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