Monday, August 23, 2021

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


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.
sudo apt update

Sumber: disini

0 comments:

Post a Comment