Solve: cdrom://[Debian GNU/Linux 12.2.0 _Bookworm_ – Official amd64 DVD Binary

Debian is an evergreen and long-term-supported Linux distro that has been used to power hundreds of servers around the globe. It is known for its stability and reliability which is the reason multiple Linux distros have been derived from it including Ubuntu. While the official Debian repositories contain a vast array of software, there might be occasions when you wouldn’t have it out of the box after completing the installation. In such a scenario, we have to add them manually, to make the system work properly and install various packages using the internet.

Add official Souces.list repos in Debian 12

In this tutorial, we’ll walk you through the process of adding the repositories in “sources.list” file on your Debian 12 system.

Step 1: Run the system update

Go to your Debian 12 Desktop or Server terminal and execute the system update command to confirm that the official repositories are not available.

sudo apt update

If the system doesn’t update itself instead through the following error then it means, the default system repositories in your Debian 12 are missing.

Error:

Ign:1 cdrom://[Debian GNU/Linux 12.2.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20231007-10:29] bookworm InRelease
Err:2 cdrom://[Debian GNU/Linux 12.2.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20231007-10:29] bookworm Release
Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Reading package lists... Done
E: The repository 'cdrom://[Debian GNU/Linux 12.2.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20231007-10:29] bookworm 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.

Step 2: Add the Debian 12 default repository

Now, to solve this problem of not having a connection with the remote Debian repo server which appears after the installation because our system only has one repository link which is to the CD, we have used to install the OS. So, that needs to be changed.

In your command terminal edit the Sources.list file:

sudo nano /etc/apt/sources.list

Put # in the front of the existing CDRom repo or delete it.

After that copy and past the default Debian 12 system repositories:

deb https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware

deb https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware

deb https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware

deb https://ftp.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware

deb https://security.debian.org/debian-security/ bookworm-security contrib main non-free non-free-firmware
# deb-src https://security.debian.org/debian-security/ bookworm-security contrib main non-free non-free-firmware

Save the file by pressing Ctrl+X and typing Y after that hit the Enter key.

Add official Souces.list repos in Debian 12

Step 3: Update the APT package list

After updating the repository source file, once again run the system update command and this time you will not see any error. Your system will download and install not only the latest updates but even the common packages available for Linux systems.

sudo apt update

4 thoughts on “Solve: cdrom://[Debian GNU/Linux 12.2.0 _Bookworm_ – Official amd64 DVD Binary”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.