0

I have a Ubuntu Server setup, and it doesn't have internet, so I'm downloading packages from http://packages.ubuntu.com and installing them manually (instead of using apt-get).

But the problem is, some of the package dependencies just doesn't install! For instance, the build-essential package depends on another package which depends on five other packages and so on.

It's going to take me an hour to click all the download links and download all of them.

What should I do?

4
  • you could install the dependencies through gdebi. But it needs an internet connection. Jun 14, 2014 at 17:05
  • @AvinashRaj which is exactly what I don't have..... or else I would use apt-get
    – Louis Hong
    Jun 14, 2014 at 17:06
  • @Creator who said I was satisfied?
    – Louis Hong
    Jun 14, 2014 at 17:49
  • @Louie ignore it not for you
    – Chinmaya B
    Jun 14, 2014 at 17:51

1 Answer 1

2

Use the following command to list everything a package needs for its installation and then download all of them:

$ sudo apt-get --print-uris --yes install <package-name> | grep ^\' | cut -d\' -f2 > downloads.list

And read this if you need more information.

4
  • then from where are you downloading packages??
    – Chinmaya B
    Jun 14, 2014 at 17:52
  • This is very useful, but this assumes I have another linux machine with internet. But I really can't ask for more I guess. I'll wait a bit and if there isn't anything beter I'll choose you
    – Louis Hong
    Jun 14, 2014 at 17:53
  • Yes, my question assumes I have another machine with internet, sadly my other machine does not run linux, but I guess you're answer is pretty good already, I'll install linux on my other machine just to run this line.....
    – Louis Hong
    Jun 14, 2014 at 17:54
  • doesn't work on 16.04, grep: invalid argument ' for '--directories'
    – yaakov
    May 3, 2017 at 19:31

Not the answer you're looking for? Browse other questions tagged .