Have you ever been into trying to install a package in a computer that is not connected to the network? Keep reading to find solutions to this problem.
Follow these Steps:
- Find out what packages have to be downloaded
Case 1: You have a recent synaptic version.
The first step would be to open Synaptic and select the package(s) you want to install. Then go to File -> Generate package download script and save it naming it as you want (herein referred as download_script_file).
Case 2: You don't have a recent synaptic version or you are not using any window manager.
Use grabpackages.py (attached). Type python grabpackages.py -h to see the help. This is the command you would use to download Inkscape and its dependencies:
Now take download_script_file to the computer with internet access.Code:python grabpackages.py -o download_script_file inkscape
- Download the packages
Case 1: The computer with internet access has a linux OS with wget installed.
Open a terminal and cd to a suitable directory (e.g. cd /tmp).
Create a directory to download the packages and cd into it:
Copy download_script_file into this directory and execute it:Code:mkdir packages_dir cd packages_dir
The script begins to download the files using wget.Code:sh download_script_file
Case 2: You have a Windows/Linux box but wget is not installed.
You could try one of these:
- Install wget
In Redhat/Fedora:Code:sudo apt-get install wget
In Windows: see here.Code:yum install wget
- Generate an html page and download the packages from your browser
If you already have the download script file generated by synaptic, the easiest way is to use downloadscript2html.py (attached):
If not, grabpackages.py (attached) will work too (using the --html option). Revisiting the Inkscape example:Code:python downloadscript2html.py download_script_file download_page.html
Now open download_page.html in your browser and download the linked files in your download directory (here a download accelerator like DownThemAll is very useful, specially with large files).Code:python grabpackages.py --html -o download_page.html inkscape
- Copy the packages to your PC
Copy the .deb files you downloaded to /var/cache/apt/archives:
From the directory where the .deb files are stored type:
or start Nautilus as root and copy the files in the usual way.Code:sudo cp *.deb /var/cache/apt/archives
- Install the packages
Just open a terminal and type
Code:sudo apt-get install <package_name(s)>
replacing <package_name(s)> with the name(s) of the program(s) you wanted to install (E.g. inkscape).
This should be pretty much everything.
The attached scripts are written in Python. In some systems Python is not installed by default. See http://www.python.org/download/ to solve this.