Jump to content

How to Install Debian Packages From CD-ROM

0
  carlaschroder's Photo
Posted Aug 20 2009 12:08 PM

You want to install packages from a CD-ROM, but the process we've just described assumes you want to download software from an archive. How do you add a CD to sources.list?
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'
$


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.

Linux Cookbook

Learn more about this topic from Linux Cookbook.

Linux information can be found scattered in man pages, texinfo files, and source code comments, but the best source is the experts who have built up a working knowledge of managing Linux systems. The Linux Cookbook's tested techniques distill years of hard-won experience into practical cut-and-paste solutions to everyday Linux dilemmas. Use just one recipe from this collection of real-world solutions, and the hours of tedious trial-and-error saved will more than pay for the cost of the book. It's more than a time-saver; it's a sanity saver.

See what you'll learn


Tags:
0 Subscribe


1 Reply

0
  Xinerama's Photo
Posted Dec 02 2010 12:08 AM

Thank you, thank you, thank you. Exactly what I needed. Even though it's not solving my solution it's helping me overcome these little learning curves.