Source list linux debian

Source list linux debian

Как часть своей работы, Apt использует файл содержащий список ‘источников’ из которых могут быть скачаны пакеты. Этот файл /etc/apt/sources.list.

Содержимое этого файла обычно имеет следующий формат (приведенные ниже данные являются вымышленными и не должны использоваться):

deb http://site.example.com/debian distribution component1 component2 component3 deb-src http://site.example.com/debian distribution component1 component2 component3

Тип архива

Первое слово в каждой строке, deb или deb-src, указывает тип архива. Deb указывает что архив содержит бинарные пакеты (deb), пре-компилированные пакеты для нормального использования. Deb-src указывает что это архив пакетов с иходным кодом, который содержит оригинальные исходные коды программ плюс контрольный файл Debian (.dsc) и diff.gz содержащий изменения и необходимый для пакетирования программы.

URL Репозитория

Следующая запись в строке это адрес (URL) репозитория с которого вы хотите скачивать пакеты. Основной список зеркал репозитория Debian находитсяздесь.

Дистрибутив

‘distribution’ может быть либо кодовое имя / псевдоним релиза (jessie, stretch, buster, sid), либо класс релиза (stable, oldstable, testing, unstable). Если вы имеете в виду отслеживание класса релиза, а затем хотите использовать название релиза, или же если вы просто хотите отслеживать цикл релизов Debian, то используйте кодовое имя.

Например, если у вас есть система работающая на Debian 12.0 «bookworm» и вы не хотите обновляться когда выйдет Debian «trixie», в таком случае нужно использовать «bookworm» вместо «trixie». Если вы всегда хотите помогать с тестированием дистрибутива, то используйте «testing». Если вы отслеживаете цикл «trixie» и хотите оставаться на нём от тестирования и до конца его жизни, используйте «trixie».

Компонент

main состоит из DFSG-compliant пакетов, которым не требуется другое ПО из других зон. Эти пакеты считаются частью дистрибуции Debian

Читайте также:  Ubuntu flavors of linux

contrib пакеты содержат DFSG-compliant ПО, но у них зависимостей из зоны main (возможно упакованы в non-free).

non-free содержит ПО, которое не соответствует DFSG.

Пример sources.list

Ниже приведен пример файла sources.list для Debian 9/Stretch.

deb http://deb.debian.org/debian/ stretch main deb-src http://deb.debian.org/debian/ stretch main deb http://deb.debian.org/debian/ stretch-updates main deb-src http://deb.debian.org/debian/ stretch-updates main deb http://security.debian.org/debian-security/ stretch/updates main deb-src http://security.debian.org/debian-security/ stretch/updates main

Если вы хотите подключить репозиторий с несвободными компонентами системы, то добавьте contrib non-free после main:

deb http://deb.debian.org/debian/ stretch main contrib non-free deb-src http://deb.debian.org/debian/ stretch main contrib non-free deb http://deb.debian.org/debian/ stretch-updates main contrib non-free deb-src http://deb.debian.org/debian/ stretch-updates main contrib non-free deb http://security.debian.org/debian-security/ stretch/updates main contrib non-free deb-src http://security.debian.org/debian-security/ stretch/updates main contrib non-free

Для редактирования вашего файла sources.list, вы можете воспользоваться утилитой software-properties-gtk. Расположенной в Menu → System → Administration → Software Sources.

gksu --desktop /usr/share/applications/software-properties.desktop /usr/bin/software-properties-gtk

Используем Tor вместе с Apt

Apt может получать и загружать обновления через Tor. Для этого вам нужно установить пакеты tor и apt-transport-tor. Затем вы можете использовать официальные onion-ресурсы в Debian.

Ниже приведен пример файла sources.list использующий onion-ресурсы в Debian 9/Stretch:

deb tor+http://vwakviie2ienjx6t.onion/debian stretch main deb-src tor+http://vwakviie2ienjx6t.onion/debian stretch main deb tor+http://vwakviie2ienjx6t.onion/debian stretch-updates main deb-src tor+http://vwakviie2ienjx6t.onion/debian stretch-updates main deb tor+http://sgvtcaew4bxjd7ln.onion/debian-security stretch/updates main deb-src tor+http://sgvtcaew4bxjd7ln.onion/debian-security stretch/updates main

CD-ROM

Если вы хотите использовать CD-ROM для установки пакетов или автоматического обновления системы через APT, то можно записать его в /etc/apt/sources.list. Для этого можно использовать программу apt-cdrom, например:

Можно использовать -d для каталога точки монтирования CD-ROM или добавить точку монтирования не-CD (т.е. USB накопитель).

Проблемы с разрешением доменных имен

Если у вас сломалось/не работает разрешение имён. Например, ниже запущен порт S/390x в QEMU Chroot:

# apt-get update 0% [Working]Unsupported socketcall: 20 Unsupported socketcall: 20 Unsupported socketcall: 20 Unsupported socketcall: 20 Unsupported socketcall: 20 Unsupported socketcall: 20 Unsupported socketcall: 20 Unsupported socketcall: 20 Err:1 http://ftp.us.debian.org/debian testing InRelease Temporary failure resolving 'ftp.us.debian.org' Reading package lists. Done W: Failed to fetch http://ftp.us.debian.org/debian/dists/testing/InRelease Temporary failure resolving 'ftp.us.debian.org' W: Some index files failed to download. They have been ignored, or old ones used instead.

Вы можете временно обойти эту проблему, указав IP адрес репозитория (получив его с другой машны):

echo "deb http://128.30.2.26/debian testing main contrib" > /etc/apt/sources.list apt-get update Get:1 http://128.30.2.26/debian testing InRelease [232 kB] Get:2 http://128.30.2.26/debian testing/main s390x Packages [7583 kB] Get:3 http://128.30.2.26/debian testing/main Translation-en [5134 kB] Get:4 http://128.30.2.26/debian testing/contrib s390x Packages [42.7 kB] Get:5 http://128.30.2.26/debian testing/contrib Translation-en [44.7 kB] Fetched 13.0 MB in 32s (403 kB/s) Reading package lists. Done

Debug Symbol Packages

Для отладки аварийных остановок работы программ часто требуются соответствующие файлы символов отладки. Для большинства пакетов Debian они находятся в пакетах dbgsym. Они доступны из отдельного архива.

Читайте также:  What is drm linux

Ниже приведен пример файла sources.list для dbgsym-пакетов Debian 9/Stretch:

deb http://deb.debian.org/debian-debug/ stretch-debug main

Подробнее

  • sources.list(5) man page
  • Список неофициальных репозиториев, что-бы получить дополнительные программы ( Skype, Opera, Google )
  • AptCLI
  • AptPreferences
  • APT HOWTO
  • поиск по неофициальным репозиториям (восновном очень старые пакеты)
  • Debian на CD/DVD
  • Добавление списка источников, в том числе cd, используя apt-setup
  • deb.debian.org

Источник

Setup Debian 11 Official Repository In sources.list (/etc/apt/sources.list)

ITzGeek

When you install Debian 11 using a DVD, the OS installer sets the DVD as the source for getting packages for your system if you didn’t choose to scan for network mirrors.

Due to this reason, the system would ask you to insert a DVD if the disc is not present in the DVD drive when you try to install any software. Also, the packages on DVD may not be the latest release. So, we need to get the packages from the Internet.

Media change: please insert the disc labeled 'Debian GNU/Linux 11.0.0 _Bullseye_ - Official amd64 DVD Binary-1 20210814-10:04' in the drive '/media/cdrom/' and press [Enter]

The /etc/apt/sources.list file with DVD as a source would look something like below.

# deb cdrom:[Debian GNU/Linux 11.0.0 _Bullseye_ - Official amd64 DVD Binary-1 20210814-10:04]/ bullseye contrib main deb cdrom:[Debian GNU/Linux 11.0.0 _Bullseye_ - Official amd64 DVD Binary-1 20210814-10:04]/ bullseye contrib main deb http://security.debian.org/debian-security bullseye-security main contrib deb-src http://security.debian.org/debian-security bullseye-security main contrib # bullseye-updates, to get updates before a point release is made; # see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports # A network mirror was not selected during install. The following entries # are provided as examples, but you should amend them as appropriate # for your mirror of choice. # # deb http://deb.debian.org/debian/ bullseye-updates main contrib # deb-src http://deb.debian.org/debian/ bullseye-updates main contrib

Debian 11: Official sources.list

To set up a Debian 11 official repository on your system, add/update the /etc/apt/sources.list file with the below details.

deb http://deb.debian.org/debian/ bullseye main deb-src http://deb.debian.org/debian/ bullseye main deb http://security.debian.org/debian-security bullseye-security main contrib deb-src http://security.debian.org/debian-security bullseye-security main contrib deb http://deb.debian.org/debian/ bullseye-updates main contrib deb-src http://deb.debian.org/debian/ bullseye-updates main contrib

Debian 11: Contrib & Non-Free

If you want to receive contrib and non-free packages for your system, use the below one.

deb http://deb.debian.org/debian bullseye main contrib non-free deb-src http://deb.debian.org/debian bullseye main contrib non-free deb http://deb.debian.org/debian-security bullseye/updates main contrib non-free deb-src http://deb.debian.org/debian-security bullseye/updates main contrib non-free deb http://deb.debian.org/debian bullseye-updates main contrib non-free deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free

Debian 11: Backports

In case you want to add Backports, update the sources.list with the below information.

deb http://deb.debian.org/debian bullseye-backports main contrib non-free deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free

Update

Once you have added the repositories, update the repository index.

Читайте также:  Linux use shared library

Conclusion

That’s All. I hope this post helped you add the required repositories on your Debian 11 system to get the latest packages from the internet.

Источник

Оцените статью
Adblock
detector