download R Packages For Offline Installation
-
HOWTO: Download package dependencies for offline installation 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 Debian/Ubuntu:
In Redhat/Fedora:Code:
sudo apt-get install wget
In Windows: see here.
- 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
- Install wget
- 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.
Note: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.
Additional references:
- Ubuntu community help about Synaptic download script
- This thread
- Find out what packages have to be downloaded
-
Re: HOWTO: Download package dependencies for offline installation
Hi. Thanks for this good and usefull post, I am working in an offline PC and trying to learn Linux right now.
My problem is, the links from the generated html file is broken (please see attached zipped html file). I hope to install xchm on my Ubuntu 7.04 btw. Can you help me solve my problem?
I used this command to generate the html file:
Here is an example of the link generated:I hope someone could help.Code:
python grabpackages.py --html -o download_page.html xchm
-
Re: HOWTO: Download package dependencies for offline installation
The problem is going to be that your version of Ubuntu has reached its End Of Life. The links to packages created from the HOWTO are broken because those versions have been removed from Ubuntu's active repositories.
Originally Posted by potwak
I hope to install xchm on my Ubuntu 7.04 btw. Can you help me solve my problem?
However, they do keep an archive of older packages at a different location. If you change the address in the link from archive.ubuntu.com to old-releases.ubuntu.com you may be able to at least get most of the packages you need.
-
Re: HOWTO: Download package dependencies for offline installation
does this only work if you don't have the package and all its dependencies already installed?
Originally Posted by sergiodlc
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:
[LIST=1][*]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).
i already have a package and it's dependencies installed, and i want to install the same package+dependencies on another computer that isn't connected to the network.
when i select the "Generate package download script" option i get a file with just "#!/bin/sh" at the top.
i guess we are supposed to do this part on the computer that is not connected to the internet and doesn't have the package installed?
anyway, the python script has worked fine for me. thanks!
-
Re: HOWTO: Download package dependencies for offline installation
Guys... this does not under Windows
(Python 2.6.3 installed)D:\>python grabpackages.py --html -o download_page.html inkscape
Traceback (most recent call last):
File "grabpackages.py", line 86, in <module>
packages = get_debs(args, options.repo, options.archivecheck)
File "grabpackages.py", line 50, in get_debs
archive = set(os.listdir('/var/cache/apt/archives'))
WindowsError: [Error 3] The system cannot find the path specified: '/var/cache/apt/archives/*.*'D:\>python grabpackages.py -o download_script_file inkscape
Traceback (most recent call last):
File "grabpackages.py", line 86, in <module>
packages = get_debs(args, options.repo, options.archivecheck)
File "grabpackages.py", line 50, in get_debs
archive = set(os.listdir('/var/cache/apt/archives'))
WindowsError: [Error 3] The system cannot find the path specified: '/var/cache/apt/archives/*.*'
-
Re: HOWTO: Download package dependencies for offline installation
Yes, because Windows doens't have /var/cache/apt/archives and very similar directories or filesystems...
As I see, this script is intended to work on Linux systems.Last edited by sh4d0w808; October 7th, 2009 at 02:57 PM.
Being a target means being on the internet. End of line.
Takedown blog (hungarian)
-
Re: HOWTO: Download package dependencies for offline installation
Hi everyone...
Sorry to wake up a dead post like this, the thing is I plan on installing 9.04 server edition on my home PC and obviously run Vmware on it and manage my virtual machines via my desktop edition running on my lappy. Now the problem with this is that my home machine doesn't have internet access, I can only access the net only at work, now looking at this command
I get confused. Can someone please explain to me if the "inkscape" part of the command means it will only download packages associated to it and if so, does it mean I have to do the same for every software I wanna install? while on it, is it possible to have updates downloaded using this method?Code:
python grabpackages.py -o download_script_file inkscape
Please dont kill me as I havn't tried it yet, but I was hoping to use this method to download the headers needed for Vmware, will it work or am I going nuts?
Thanks in advance
-
Re: HOWTO: Download package dependencies for offline installation
Is it possible to use this script to download the packages for the 64-bit system? My system with an Internet connection uses packages for i386. It seems that I need to specify an alternate repository to download 64-bit packages, but I could not find the URL 64-bit Ubuntu repository...
Thanks
-
Re: HOWTO: Download package dependencies for offline installation
The script admits the -r option to change the repository.
Originally Posted by kirzhanov
Is it possible to use this script to download the packages for the 64-bit system? My system with an Internet connection uses packages for i386. It seems that I need to specify an alternate repository to download 64-bit packages, but I could not find the URL 64-bit Ubuntu repository...
Thanks
-
Re: HOWTO: Download package dependencies for offline installation
"inkscape" is just an example package. Instead you should write the package names (separated by spaces) of the packages you intend to install.
Originally Posted by tsh3po
Hi everyone...
Sorry to wake up a dead post like this, the thing is I plan on installing 9.04 server edition on my home PC and obviously run Vmware on it and manage my virtual machines via my desktop edition running on my lappy. Now the problem with this is that my home machine doesn't have internet access, I can only access the net only at work, now looking at this command
Code:
python grabpackages.py -o download_script_file inkscape
I get confused. Can someone please explain to me if the "inkscape" part of the command means it will only download packages associated to it and if so, does it mean I have to do the same for every software I wanna install? while on it, is it possible to have updates downloaded using this method?
Please dont kill me as I havn't tried it yet, but I was hoping to use this method to download the headers needed for Vmware, will it work or am I going nuts?
Thanks in advance
If you have ~30 GB of spare hard disk space in your laptop a much better solution would be to download the complete repository using apt-mirror, as explained here. Then you can access the local repository in your laptop from your home PC (provided that they can be connected
).Instead of VMWare I would suggest Virtualbox, an open source virtualization solution that works just fine.
Sergio
Posted by: flaviasproleser.blogspot.com
Source: https://ubuntuforums.org/showthread.php?t=1100816
Komentar
Posting Komentar