转载自:https://blog.csdn.net/gm339848555/article/details/51527600
转自:http://www.bernzilla.com/item.php?id=959 How to Make 'apt-get install' Stop Requiring Your Ubuntu DVD
Now that I'm playing around with Ubuntu, I'm starting to install more applications that didn't come with the default install of the OS. The app of the moment happens to be GParted, because I'm trying to add an additional 80GB hard drive to C3PO.
When I've attempted to use apt-get install
to install the applications I need, I keep getting prompted for my original Ubuntu installation DVD. At first I didn't think it was that big a deal, but now it's become a bit of an annoyance. When I tried to install GParted, for example, I got this message:
Media change: please insert the disc labeled
'Ubuntu 7.10 _Gutsy Gibbon_ - Release i386 (20071017)'
in the drive '/cdrom/' and press enter
So I did a little digging and found this helpful thread in the Ubuntu Forums. After reading that, I opened up my sources file:
sudo vi /etc/apt/sources.list
I commented out the very first line, which started with:
deb cdrom:[Ubuntu 7.10 _Gutsy Gibbon_ - Release i386 (20071017)]/
...by simply adding a # in front of the line. I saved the file and then ran the following to update the sources:
sudo apt-get update
That updated my sources without the need for the DVD, and then the next time I ran sudo apt-get install gparted
, the DVD dependency had vanished.
Pretty simple, and no more annoyance!