step 3.修改 /etc/apt/sources.list
Debian 12: The repository CDROM does not have a Release file
# sudo apt-get update
sudo apt-get upgrade
Ign:1 cdrom://[Debian GNU/Linux 12.1.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20230722-10:49] bookworm InRelease
Err:2 cdrom://[Debian GNU/Linux 12.1.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20230722-10:49] 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.1.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20230722-10:49] 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.
# cat /etc/apt/sources.list
omment the line
deb cdrom:[Ubuntu Desktop <version> <codename> - x86] <code name> <reponames>
old
deb cdrom:[Debian GNU/Linux 12.1.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20230722-10:49]/ bookworm main non-free-firmware
new
#deb cdrom:[Debian GNU/Linux 12.1.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20230722-10:49]/ bookworm main non-free-firmware
https://askubuntu.com/questions/1388910/assistance-needed-with-the-repository-cdrom-does-not-have-a-release-file