LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Using downloaded packages (https://www.linuxquestions.org/questions/debian-26/using-downloaded-packages-4175445013/)

rng 01-10-2013 10:45 AM

Using downloaded packages
 
I have Debian-Testing on 2 computers. One has a fast internet connection while the connection is very slow in the other. If I install some large package on the computer with fast internet connection, how can I use the downloaded files on the other computer for installing same package there? Thanks for your help.

kinneyd 01-10-2013 04:37 PM

Are you using apt-get or aptitude to install?

If so you'll probably find the .deb files in /var/cache/apt/archives on the system with the fast connection after you've installed a package. You can copy these files over to the same directory on the system with the slow connection and use the same apt-get/aptitude install command.

If these systems are networked together you can use scp to transfer the files. But I'm assuming they're not otherwise they'd both have the same faster connection right?

rng 01-10-2013 06:44 PM

The two systems are not connected via any network. I tried your method of copying the .deb files in /var/cache/apt/archives but found that the new system was still trying to download the deb packages. I was using 'wajig install <pkg>' command. Probably I should use apt-get/aptitude.

Another problem is that the deb files in /var/cache/apt/archives have their original date and not the date they are downloaded. So I cannot select the recently downloaded files and have to copy all deb files.

TobiSGD 01-10-2013 06:57 PM

Use
Code:

apt-get clean
before starting the installation on the machine with the fast connection. If you now install the software you will have only the necessary packages in the cache directory.

widget 01-10-2013 11:00 PM

When you have the needed packages on the slow machine in the /var/cache/apt/archive directory you need to do 2 things.

One disconnect the slow machine from the internet.

Two, instead of running "apt-get install <package name> run;
Code:

apt-get install --reinstall <package name>
This will insure that it will look in the right place for the package.

This will not work unless all dependencies for the package to be installed are also in the /var/cache/apt/archive directory.

I thnk a better approach would be to check out the package "aptoncd" on your fast box. You can study that and I have not ever used it but you should be able to create a "repository" on a disk and use that to install the needed packages on the slow box.

This is probably done by adding the cdrom line back into your active /etc/apt/sources.list but I am not at all sure of that so read the man page of aptoncd.

rng 01-11-2013 09:20 AM

Can I use something similar while using update and dist-upgrade commands (I use 'wajig daily-upgrade' which performs an update then a dist-upgrade)?

widget 01-11-2013 11:31 AM

I have only heard about aptoncd in forums and taken a look at the package description.

It appears to simply be a way of using a CD or DVD as a repository like any other. I get the impression that it is like having all the Debian install disks for a box somewhere where there is no connection. Using them is just like using any other repo.

Apt on CD is specifically, I gather, for situations like yours where you can get the packages for one computer for update/upgrade cycles and use them on another identical OS elsewhere.

I am sure that Debian has full documentation on it.

I did a quick search on my favorite search engine and the links look pretty good to me, check it out;
http://www.search.com/search?q=debian+aptoncd&w=on

May look at a couple myself.


All times are GMT -5. The time now is 01:39 AM.