将CD加入Ubuntu的apt-get源

1、首先执行下面命令,它会卸载CD设备,提示插入光盘

sudo apt-cdrom --no-act add (if everything is OK, then you can use sudo apt-cdrom add ).

2、将Ubuntu光盘放入光驱,待光驱读取一段时间自动挂载后,输入:

sudo apt-cdrom add 

  执行结果如下:

Using CD-ROM mount point /media/bdd/Ubuntu-Kylin 14.04.2 LTS amd64/
Identifying... [d2eebc1e39f5b2dd0bae86aa6d16a44e-2]
Scanning disc for index files...
Found 8 package indexes, 0 source indexes, 0 translation indexes and 1 signatures
This disc is called: 
'Ubuntu-Kylin 14.04.2 LTS _Trusty Tahr_ - Release amd64 (20150218.1)'
Copying package lists...gpgv: Signature made 20150219日 星期四 035832秒 CST using DSA key ID FBB75451
gpgv: Good signature from "Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>"
Reading Package Indexes... Done
Writing new source list
Source list entries for this disc are:
deb cdrom:[Ubuntu-Kylin 14.04.2 LTS _Trusty Tahr_ - Release amd64 (20150218.1)]/ trusty main multiverse restricted universe
Repeat this process for the rest of the CDs in your set.

3、执行:sudo apt-get update后,使用sudo apt-get install <package>就可以安装你想要到软件了。

注意,执行完成后查看cat /etc/apt/sources.list文件,确保文件如下一行在文件顶部或者在网络源前面,否则,安装软件的时候系统还是优先从网络上下载。
deb cdrom:[Ubuntu-Kylin 14.04.2 LTS Trusty Tahr - Release amd64 (20150218.1)]/ trusty main multiverse restricted universe

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值