[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debian CD repository



Em 05-03-2013 07:27, Muhammad Yousuf Khan escreveu:
i have downloaded all the Debian 6 DVDs from the repo. but as per my
knowledge when i run "apt-get install<packagename>" it directly go to
internet how come i tell apt-get or dpkg to install it from DVDs and
secondly it should ask for the correct DVD like Microsoft does.  for
example. if samba is placed in DVD 8 is should prompt me that insert
DVD 8. same way like microsoft does.

This happens because in some moment (perhaps at the installation) you configured the installation to use a network mirror for Debian packages. It is good to have network mirrors configured because they have updated software, which may not be the case for Debian or Microsoft DVDs.

It may be happening two things:

1. You have both your DVDs and a network mirror configured as a source for packages, but the cdroms are outdated and apt-get prefers packages from the network as they have updated versions in relation to the packages that are in your DVDs.

2. You have only network mirrors configured as source packages.

To decide which case you have, open a terminal and do the command

cat /etc/apt/sources.list

If this file has 6 lines starting as 'deb cdrom:', then you have situation 1. Otherwise, 2.

If you have situation 1 and you want to get only packages from the DVDs, never from the network, you can do the following: first, move sources.list away:

mv /etc/apt/sources.list /etc/apt/sources.list.OLD

then insert the first DVD and do the command

apt-cdrom add

and repeat the last command for every DVD you have. All these command mus be run as root.

If you have situation 1, you can also choose to maintain the network mirrors configured as source of packages, but download newer DVDs. The newest are version 6.0.7 for Debian "stable", and then run

apt-cdrom add

for all of them without moving away the file sources.list. However, downloading new DVDs may not be very advantageous, because you will end up downloading a lot of packages in the DVDs that you will never use. But it can be useful if your network connection is intermittent or you will use the DVDs in a lot of computers.

Situation 2 is similar. If you don't want packages from the network, then execute

mv /etc/apt/sources.list /etc/apt/sources.list.OLD

otherwise keep it. Then execute

apt-cdrom add

for every DVD you already have.

João Luis.


Reply to: