0

On a Debian system how can I extract and install a .deb package located in one folder and its dependencies located in a "pool" of other folders, using apt, dpkg and Synaptic respectively?

Edit:

I would like to be able to specify the source folder where the .deb package reside as well as the ones that contains the dependencies. All of them, say, in the home folder. I don't know if that can be done by editing the sources.list file or otherwise.

  • 1
    Are you asking how to use those various utilities, or is there something special about your file / directory structure? Please edit the question to clarify. Thank you! – Jeff Schaller Jun 7 at 19:41
  • Why can't you just use apt to instal it from the repos or just copy or move the packages into the same directory and then apt install /path/to/packages/*.deb? – Nasir Riley Jun 8 at 2:30
0

If I'm not mistaken *.deb will install everything there is in the pools. The .deb package in question needs only a fraction of those as dependencies.

0

You should place both the desired package and its dependencies in a single pool directory.

You'll need to prepare the "pool" folder containing the dependency packages with dpkg-scanpackages, which is in dpkg-dev package.

cd /some/where/package_pool_directory
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz

This makes the pool directory become a "trivial archive" style repository.

Now you should be able to specify the repository in the /etc/apt/sources.list file as:

deb file:/some/where/package_pool_directory ./

List it at the top of the file, so it will be preferred over any other repository. Then run apt update to make apt aware of the new repository, and then use the package management tools as usual.

Note that the "trivial archive" repository style is deprecated, and might stop working in future releases. At that point, hopefully some new solution will be available.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.