I have a couple of Ubuntu 14.04 64 bit boxes. One of them can talk to internet (say Machine1) and the other can not due to network restrictions (say Machine2).
Machine 2 needs some specific software to be installed, for example I may need to install google-chrome (just as an example) on this machine.
What I tried is to create a /localrepo/amd64
diretory on Machine 1. Downloaded the stable .deb package and put it in this /localrepo/amd64
directory.
This directory has a link symbolic link at /var/www/html, so the machine at least over local network can access this directory.
I ran dpkg-scanpackages amd64 | gzip -9c > amd64/Packages.gz
that generated a Packages.gz
file.
On the Machine1 I edit the sources.list file to add
http://Machine2FQDN/localrepo amd64/
I comment out all other lines that were trying to point to various ubuntu repos.
I do an apt-get update
and then try to install the package, I got a dependency issue.
Now, my question is if I want all the dependencies for the .deb file to be downloaded at Machine1 localrepo diractory what is the way for it.
I have seen answers like run the apt-get install -f, which does not work in my case, I can not allow Machine 2 to talk to ubuntu repos directly and resolve dependencies via apt-get. I do not need every single package in cache to be copied to this local repo, I need only the specific associated dependency packages to get downloaded (not installed) when I download a package through a single command.
Do we have a solution for that?
Please let me know if you need any further information.
Note: I know running apt-cache depends google-chrome-stable
lists the dependencies, but I need those dependencies to be downloaded to my own custom folder /localrepo/
The client machines are behind a restricted network and can talk only to a master node over intranet and has no access to internet.
– schow Nov 06 '14 at 01:02