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 <[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