Linux: apt-get install Error: “Media Change: Please insert the disc labelled ..”

So when we see the error in Ubuntu / Debian, basically the installer is looking for the cd as its first source of binaries:

Do you want to continue [Y/n]?
Media Change: Please insert the disc labelled
‘Debian GNU/Linux 5.0.4 _Lenny_ – Official i386 DVD Binary-1 20100131-19:16’
in the drive /cdrom/ and press enter

^C

We need to edit the /etc/apt/sources.list and comment out the line beginning with “deb cdrom …”

Using vi:

linux:~# vi /etc/apt/sources.list

Press i to insert a “#” char at the beginning of the line, then ESC, and “:wq” <RETURN> to write the file. Et voila 🙂

#############################################################
################### OFFICIAL DEBIAN CDROM ###################
#############################################################

#deb cdrom:[Debian GNU/Linux 5.0.4 _Lenny_ – Official i386 DVD Binary-1 20100131-19:16]/ lenny contrib main

#############################################################
################### OFFICIAL DEBIAN REPOS ###################
#############################################################

###### Debian Main Repos
deb http://ftp.uk.debian.org/debian/ lenny main contrib non-free