Installing packages without an Internet connection |
Sometimes, an internet connection is unavailable to install programs.
It is possible to install programs without CDs or DVDs onto offline computers, using a simple USB key for example to transfer only the packages you need.
There are several methods to do this:
Keryx is a portable, cross-platform package manager for APT-based (Ubuntu, Debian) systems. It provides a graphical interface for gathering updates, packages, and dependencies for offline computers. Keryx is free and open source. You can get Keryx here: https://launchpad.net/keryx
Here's how: Synaptic/PackageDownloadScript
Short instructions:
Select File->Generate package download script
Launch Synaptic and click on File->Add downloaded packages
Note: If you don't have access to a PC with GNU/Linux or emulating/virtualizing GNU/Linux (Cygwin, VMware, VirtualBox, Qemu, etc), just open the script with a text editor and enter all the URLs you see in your browser to download the corresponding packages.
If you have all the necessary libraries and/or dependencies, the simplest way is of course to just download the .deb package you need, just as you would with a Windows installer, and double-click the package to install it with GDebi.
All Ubuntu packages are available on http://packages.ubuntu.com/ and http://www.debian.org/distrib/packages .
If you can't even select the packages on your offline PC because you can't add the repository / update the package info, try this: AptGet/Offline/Repository
Basically, it consists in creating your own local repository, except that it won't contain the packages themselves, only the dependency information.
The problem is that when you generate the package download list using this method, it will try to get the packages from your local repository and obviously fail.
The solution is to post-process the script by replacing the URLs with the correct one.
Assuming you created the local repository at "/home/username/repository" and got the different files from "http://archive.ubuntu.com/ubuntu/", this can easily be done with the following command:
sed 's#file:///home/username/repository#http://archive.ubuntu.com/ubuntu#' download_script.sh > download_script2.sh chmod +x download_script2.sh
or directly without creating a second script:
sed -i 's#file:///home/username/repository#http://archive.ubuntu.com/ubuntu#' download_script.sh
or simply with any text editor featuring search&replace.
See also: AptGet/Offline.
apt-offline allows you to easily upgrade or install new packages on your offline PC, by using another online PC.
sudo apt-get install apt-offline
sudo apt-offline set /tmp/apt-offline.sig
sudo apt-offline get C:\apt-offline.sig --bug-reports --threads 5
sudo apt-offline install /media/USB/apt-offline.zip
sudo apt-offline set abuse-offline.sig --install-packages abuse --src-build-dep --install-src-packages abuse
sudo apt-offline get abuse-offline.sig --no-checksum --bundle abuse-offline.zip
sudo apt-offline install /media/USB/abuse-offline.zip
Комментировать | « Пред. запись — К дневнику — След. запись » | Страницы: [1] [Новые] |