將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 <[email protected]>"
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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章