Tuesday, June 11, 2019

How to download a software package with all dependencies and sub-dependencies?

Similar questions have been asked already but none of them have solved my problem:


I need to install a package on a standalone Linux box, specifically kdbg. Now I tired the command


sudo apt-get install --download-only kdbg


on a box connected to the internet, but it only downloads the package and dependencies that I don't have installed. Some of those dependencies (that command downloaded 117 total packages) have sub dependencies, and those sub dependencies have even more dependencies and I'm going down a rabbit hole trying to fish those packages out of the repo.


Now I tried using a couple of other commands that supposedly will download all dependencies, even the ones I have installed. I've tried



  1. apt-get download PACKAGE && apt-cache depends -i PACKAGE | awk '/Depends:/ {print $2}' | xargs apt-get download


and



  1. apt-get download $(apt-rdepends |grep -v "^ ").


Command one only downloads the direct dependencies, like the ones you'd find on packages.ubuntu.com if you were to search kdbg, and command two gives me the error message:


Can't select candidate version for package  as it has no candidate

for several different packages.


So, to restate my question, is there a way for me to download kdbg, all of its dependencies, all of those dependencies' dependencies, so on and so forth? Or perhaps I am using one of the above commands incorrectly?


Thanks in advance.

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...