I have apt-get
0.7.23.1 on host machine. I do not have root, thus not able to update it, or install other packages.
I want to download .deb
packages with it, but neither
apt-get -d bash
(Invalid operation bash)
nor
apt-get -d install bash
(do not have root)
work.
On my home machine with a newer version of apt-get
I can
apt-get download bash
and it does exactly what I want it to.
How can I perform the same on the host machine?
The command
apt-get download
wasn't added until version 0.8.11 ofapt
. It was first available in Ubuntu 11.04 (which uses apt 0.8.13.2). I'm not sure what you're running as AFAICT no supported version of Ubuntu contains version 0.7.23.1 ofapt
. You should really have the system administrator upgrade the machine. (I know, not very helpful.)It's not clear from your question whether or not you have access to a graphical environment. If you do, your best bet would be to grab the files from http://packages.ubuntu.com/
This is also possible from the command line as there are predictable urls. For instance:
You can find the correct version and whether the package is in
main
oruniverse
by usingapt-cache policy
.This is of course scriptable. Here's a quick one:
apt-get download [package]
works without root privileges but only for Ubuntu Natty and newer. You can also useapt download [package]
.If you've got
aptitude
installed, you can run useaptitude download [package]
If there are many variants, then download all