E: Package 'guile-1.8-dev' has no installation candidate this is an error i got

The command apt-get download wasn't added until version 0.8.11 of apt. 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 of apt. 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:

wget http://archive.ubuntu.com/ubuntu/pool/main/a/apt/apt_0.7.25.3ubuntu9.4_i386.deb

You can find the correct version and whether the package is in main or universe by using apt-cache policy.

This is of course scriptable. Here's a quick one:

#! /bin/bash
PACKAGE=$1
URI=`apt-cache show $PACKAGE | grep "Filename:" | cut -f 2 -d " "`
wget http://archive.ubuntu.com/ubuntu/$URI

apt-get download [package] works without root privileges but only for Ubuntu Natty and newer. You can also use apt download [package].

If you've got aptitude installed, you can run use aptitude download [package]

Tags:

Apt