Recipe 3.3. Installing Debian Packages from CD-ROM

 < Day Day Up > 

3.3.1 Problem

You want to install packages from a CD-ROM. The process we've just described assumes you want to download software from an archive. How do you add a CD to sources.list?

3.3.2 Solution

Modify /etc/apt/sources.list with the apt-cdrom command. This is the only way to add CD archives to sources.list. There must be a disk in the drive, but it does not need to be mounted. Then type:

# apt-cdrom add Using CD-ROM mount point /cdrom/ Unmounting CD-ROM Please insert a Disc in the drive and press enter Mounting CD-ROM Identifying.. [0eabc03d10414e59dfa1622326e20da7-2] Scanning Disc for index files..  Found 1 package indexes and 0 source indexes. This Disc is called:  'Libranet GNU/Linux 2.8.1 CD2' Reading Package Indexes... Done Wrote 1271 records. Writing new source list Source List entries for this Disc are: deb cdrom:[Libranet GNU/Linux 2.8.1 CD2]/ archive/ Repeat this process for the rest of the CDs in your set.

Use the -d switch to add a CD in a different CD drive:

# apt-cdrom -d /cdrom1 add

To identify a disk, use:

$ apt-cdrom ident Using CD-ROM mount point /cdrom/ Mounting CD-ROM Identifying.. [0eabc03d10414e59dfa1622326e20da7-2] Stored Label: 'Libranet GNU/Linux 2.8.1 CD2' $

3.3.3 Discussion

apt-get selects the newest versions of packages to install from the available sources. As the Linux world advances swiftly, your online sources will always be the newest. To make sure a program gets installed from a CD, comment out the other lines in your sources.list.

Remember to run apt-get update every time you change your sources.list.


3.3.4 See Also

  • apt-cdrom(8), apt-get(8)

  • Debian on CD, the ISO archives (http://www.debian.org/CD/http-ftp/)

     < Day Day Up > 


    Linux Cookbook
    Linux Cookbook
    ISBN: 0596006403
    EAN: 2147483647
    Year: 2004
    Pages: 434

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net