1

How can I download package A which depends on A-1 and A-2, which depend on A-1-1, A-1-2, A-2-1, A-2-2, A-2-3 etc.

So, that when I entered in a new computer without internet access, if I want to install package A I only need to do dpkg -i *.deb without any complain about the dependences issues.

Please note that I need download all the dependences, the best approach by far is the accepted answer!

1 Answers1

2

I would start with a vanilla installation USB (for the distro on the new computer), boot from that, ensure /var/apt/cache is empty, then sudo apt-get install Package-A, and copy all from /var/apt/cache to take with me.

This doesn't absolutely guarantee success still, as the install medium is not the same as the new install; but it is likely to work.

You could then install on a fresh HDD with internet disconnected, whilst still at home, & try a dry run, if it really matters!

  • This is a good idea, boot from a usb installer on the wifi connected computers. Run the command and get all the packages... I will try that, hope it works! – an offer can't refuse Aug 31 '16 at 14:09
  • As long as nothing in the offline machine has been removed, or is a different (especially older) version than what's on the USB installer, this may work. It would probably be simpler to find a way to temporarily connect the offline machine -- say, via USB tethering with a cell phone -- for long enough to do the install. – Zeiss Ikon Aug 31 '16 at 15:00
  • I must vote it up because it works like a charm. @ZeissIkon, I've considered this, using an usb tethering. However it won't worth to buy one because I hope after some tweaking, I can save that offline tablet by installing the right driver for the wireless card. – an offer can't refuse Aug 31 '16 at 15:26
  • For the future, another option for a tablet might be Bluetooth tethering. I've used it with my Android tablet and phone a couple times. It has limitations (my phone disconnects every time the screen goes to sleep), but it might work when wifi won't. – Zeiss Ikon Aug 31 '16 at 15:39
  • This is why the caveat is there about not being foolproof; but odds are in our favour! Tethering is fair enough (BT or WIFI..) but was sort of excluded in the question - & you'd've downvoted me if I'd used that as an answer! – Mark Williams Aug 31 '16 at 15:56