Tuesday, February 12, 2008

Tips on removing the annoying Ubuntu cdrom needed action in apt-get

When you install any new packages using apt-get, some of the packages will be considered as "Media changes" and need you to put the OS CD into the physical machine. like this
Get:1 http://us.archive.ubuntu.com gutsy/universe python-genshi 0.4.3-1 [271kB]
Media change: please insert the disc labeled
'Ubuntu-Server 7.10 _Gutsy Gibbon_ - Release i386 (20071016)'
in the drive '/cdrom/' and press enter

What if you are unable to do this? or tired of running from room to room? there is a little change to do to save the labor.

Just comment out the line referring cdrom in /etc/apt/sources.list. In my system this is the line you need to be commented out.
deb cdrom:[Ubuntu-Server 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted

There is a complete doc on the apt-* commands in
and will find it useful on and off.


Danny said...

If you're running a graphical interface, you can also go to System>Administration>Software Sources, you'll be prompted for your password, and when the software source window come up, the first tab, "Ubuntu Software", look in the box called, "Installable from CD-ROM/DVD" and uncheck the box for using the CD-ROM.

Jinfan said...

Thanks for the info, Danny. I am running a server component and I am always using the command line since most of the time I am away from the machine using vanilla SSH to login.

Danny said...

I've set up a command line only server myself now. I need to learn it. I've started with a file server. I have a lot to learn. I have it set up, Samba installed, and our desktops can see it, but can't do anything with it yet.

Checkout my post on our Free Geek Central Florida Edubuntu LTSP we're building for a school.