sergiodlc
March 19th, 2009, 10:10 PM
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 106990 (attached). Type python grabpackages.py -h to see the help. This is the command you would use to download Inkscape (http://www.inkscape.org) and its dependencies:
python grabpackages.py -o download_script_file inkscape
Now take download_script_file to the computer with internet access.
Download the packages
Case 1: The computer with internet access has a linux OS with wget (http://www.gnu.org/software/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:
mkdir packages_dir
cd packages_dir
Copy download_script_file into this directory and execute it:
sh download_script_file
The script begins to download the files using wget (http://www.gnu.org/software/wget/).
Case 2: You have a Windows/Linux box but wget (http://www.gnu.org/software/wget/) is not installed.
You could try one of these:
Install wget (http://www.gnu.org/software/wget/)
In Debian/Ubuntu:
sudo apt-get install wget
In Redhat/Fedora:
yum install wget
In Windows: see here (http://ubuntuforums.org/showthread.php?t=291071).
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 106997 (attached):
python downloadscript2html.py download_script_file download_page.html
If not, 106990 (attached) will work too (using the --html option). Revisiting the Inkscape (http://www.inkscape.org) example:
python grabpackages.py --html -o download_page.html inkscape
Now open download_page.html in your browser and download the linked files in your download directory (here a download accelerator like DownThemAll (http://www.downthemall.net/) is very useful, specially with large files).
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:
sudo cp *.deb /var/cache/apt/archives
or start Nautilus as root and copy the files in the usual way.
Install the packages
Just open a terminal and type
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.
Note:
The attached scripts are written in Python (http://www.python.org). In some systems Python (http://www.python.org) is not installed by default. See http://www.python.org/download/ to solve this.
Additional references:
Ubuntu community help about Synaptic download script (https://help.ubuntu.com/community/Synaptic/PackageDownloadScript)
This thread (http://ubuntuforums.org/showthread.php?t=174354)
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 106990 (attached). Type python grabpackages.py -h to see the help. This is the command you would use to download Inkscape (http://www.inkscape.org) and its dependencies:
python grabpackages.py -o download_script_file inkscape
Now take download_script_file to the computer with internet access.
Download the packages
Case 1: The computer with internet access has a linux OS with wget (http://www.gnu.org/software/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:
mkdir packages_dir
cd packages_dir
Copy download_script_file into this directory and execute it:
sh download_script_file
The script begins to download the files using wget (http://www.gnu.org/software/wget/).
Case 2: You have a Windows/Linux box but wget (http://www.gnu.org/software/wget/) is not installed.
You could try one of these:
Install wget (http://www.gnu.org/software/wget/)
In Debian/Ubuntu:
sudo apt-get install wget
In Redhat/Fedora:
yum install wget
In Windows: see here (http://ubuntuforums.org/showthread.php?t=291071).
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 106997 (attached):
python downloadscript2html.py download_script_file download_page.html
If not, 106990 (attached) will work too (using the --html option). Revisiting the Inkscape (http://www.inkscape.org) example:
python grabpackages.py --html -o download_page.html inkscape
Now open download_page.html in your browser and download the linked files in your download directory (here a download accelerator like DownThemAll (http://www.downthemall.net/) is very useful, specially with large files).
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:
sudo cp *.deb /var/cache/apt/archives
or start Nautilus as root and copy the files in the usual way.
Install the packages
Just open a terminal and type
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.
Note:
The attached scripts are written in Python (http://www.python.org). In some systems Python (http://www.python.org) is not installed by default. See http://www.python.org/download/ to solve this.
Additional references:
Ubuntu community help about Synaptic download script (https://help.ubuntu.com/community/Synaptic/PackageDownloadScript)
This thread (http://ubuntuforums.org/showthread.php?t=174354)