1

I'm setting up a bunch of XUbuntu build servers running on VMware vSphere, which for IT policy reasons aren't allowed to access the internet. Of course this means I can't get updates or new packages if I need them. Fair enough, I thought - I'll grab the repositories I need, stick them in an ISO file, and then all my build servers can use that ISO file as a virtual DVD drive. Point Linux at those repositories, and job done.

Not so fast, cowboy...

I've followed the instructions in Ubuntu's AptGet/Offline/Repository wiki page. It's slightly out of date (the zip file format is different, and we also have InRelease files now), but correcting the file extensions, I've managed to download everything relevant, I think. I've downloaded main, multiverse, restricted and universe for xenial, xenial-updates, xenial-backports and xenial-security, as per that page. I also did the same for OpenJDK (which I need) and Canonical. I'm running 64-bit Xenial, but I need to cross-compile so I grabbed both amd64 and i386, as well as the source on general principles. Total space needed was 400MB.

(As an alternative solution, I did also see this page about setting up a full mirror, but that said I'd need 120GB. I don't need to mirror every release ever on every platform ever, so this didn't seem like a good move.)

I've then disabled the standard (online) repositories and added my own. My /etc/apt/sources.list file now looks like this. /etc/apt/sources.list file

I've then run "sudo apt-get update". After that though, apt-get will not let me install anything from these repositories - I just get "unable to locate package". (This is easiest to test with OpenJDK, which isn't in the regular Xenial release.)

What have I missed here?

Edit: also tried...

  • Three forward slashes on the "file:///".

  • Copying files from a shared location to a local drive.

  • Setting permissions to be readable and writable by everyone for all files and directories recursively.

  • Adding "trusted=yes" for these local repositories in the source.list file.

  • apt-get clean.

  • Did you forget to run sudo apt update after editing sources.list? – mook765 Oct 2 '18 at 16:37
  • @mook765 Oops, that was a Swype typo I didn't spot! Yes I did, I just mistyped it in the post. Thanks for picking that up. – Graham Oct 2 '18 at 18:44
  • I believe you have to insert a double-slash after the colons deb file:///media/us.... – mook765 Oct 2 '18 at 19:34
  • Thanks. I've tried that too - still no joy. Please keep feeding me ideas though! I know I've missed something, just not what. :) – Graham Oct 2 '18 at 19:56
  • So my next idea is a trailing slash after ubuntu ...10-32-16/ubuntu/ xenial main ... – mook765 Oct 2 '18 at 20:07

Your Answer

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

Browse other questions tagged or ask your own question.