Media change: please insert the disc labeled 解决方法

本文介绍了一种简单的方法来避免使用Ubuntu安装DVD进行软件安装。通过修改sources.list文件并注释掉与DVD相关的行,然后更新源,即可解决安装过程中反复提示插入DVD的问题。

转自: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!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值