您的位置:首页 > 其它

将CD加入Ubuntu的apt-get源

2017-03-07 20:51 260 查看
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 2015年02月19日 星期四 03时58分32秒 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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: