0

I have this system that has a basic Ubuntu 12.04.4 LTS installation on it, but no network access. I have this set of deb packages which have been copied to some location on said machine. How do I get dpkg and/or apt to recognise these packages as available?

I thought $ sudo dpkg --recursive --record-avail would do it, and it does see each package and reports "Recorded info about …" for each one, but later attempts to $ sudo apt-get install or $ sudo dpkg -i fail just as before the 'record-avail'. I think I'm close but missing something.

  • Have a look at some of the options here: askubuntu.com/questions/974/… – muru Jul 25 '14 at 12:18
  • @muru: A very useful question page indeed. After a fair amount of work on my part, apt-offline turned out to be what I needed. – Urhixidur Jul 30 '14 at 20:02
  • Ah, sorry if it was a lot of trouble, I figured one of those answers would apply closely to you case. Could you add an answer here for the benefit of future users, considering it took a bit of work? – muru Jul 30 '14 at 20:05
  • 1
    Don't misunderstand me: your suggestion was spot on. Using apt-offline to get the list of missing dependencies for any given package is the first, crucial step in installing said package, whether one is making a partial local repository or feeding apt's cache directly. The main problem I ran into was that, in the absence of any files in /var/lib/apt/lists to start with, both apt and apt-offline conk out without yielding any useful error messages. If anyone thinks it may be useful, I could expand the answer to detail the steps one must follow. – Urhixidur Jul 31 '14 at 13:24
1

It turns out one must first copy the repository descriptors (Packages, Sources, Release, Release.gpg, Index, Translation-en) to /var/lib/apt/lists. Start by installing apt-offline, which has very few dependencies (I was starting from a command-line Ubuntu installation). Once the repository descriptors are in place, both apt-offline and apt become workable.

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.