Ubuntu – installing packages and applications offline

Ubuntu and all its derivatives are extremely easy to maintain, and installing new applications is also easy – if you are online. Meaning that you have to have an internet connection to update current status of software from repositories and then install them. If you do not have working internet connection what to do? One of the most annoying situations is the one where you need certain packages to get your 3G connection working, and 3G connection is only one you have at your disposal. Kind of catch-22 situation.

Although modern computers (especially laptops) have several ways to connect with network (ethernet, wifi, 3G, traditional modem), it may happen that none of them can be used. Laptop could be transported easily to some other location and then you could use e.g. wifi to install packages if 3G does not work, but with desktop this just is not practical. What to do?

Actually there are several solutions. Some of them are quite complicated, but the bottom line is that it is possible as long as you have access to some other machine that has internet connection. If 3G modem does not work with your computer, you could buy or loan a router with USB 3G features, and which works with your 3G stick. Good thing is that, then you can share your 3G connection with several computers.

One problem is that, most Linux packages depend on some other packages. This means that usually you cannot just take one package and install it on your machine, unless you have some other packages installed. Most ubuntu users are used to graphical package managers and command line tools which make installation and upgrade very easy, since they take care of these dependencies.

Hard way (manually)
You have to check dependencies manually, then down load packages on some other machine, transfer them to target machine, and manually install them in certain order. Problem is, that your machine may not be in sync with current status of software repositories. This could cause a cascade effect where you have to install several packages in order to get one package working. It not always enough to just put the downloaded .deb package into /var/cache/apt/archives.

You can check description and dependencies of package from http://packages.ubuntu.com. It has a search function, use it. Package info tells all dependencies (these are mandatory) and recommendations (not mandatory, but almost). If you do not have these packages already installed, then you need to check them too, and so on. When you finally know what packages you need you can download them from this same place.

Now that you have all these files, you should transfer them to the computer where you want to install them. As root user put them into directory /var/cache/apt/archives. This is where apt stores downloaded files.

When this is done, you can try if apt is able to install your package. Apt does not care if you put the file in archives yourself or did apt download it, as long as it is there, and it is exactly the version it needs, and all other necessary packages are there too. You can do this from command line

sudo apt-get install new_package_name

If you are lucky this may actually work. However, it is possible that the packages you downloaded are more recent versions that your machine needs, because your machine has out of date information of software packages. Then you have to use Debian package installer.

Easier way – Keryx
There is actually a program called Keryx, which is designed for offline Ubuntu software installation. You can download the program from Keryx website. Program runs on both Linux and Windows. Idea is that it takes a snapshot of your Ubuntu machines software state, and then you can download necessary new or upgrade software on some other computer with network connection, and then get back to other machine and actually install them.

You can download Keryx as zip-package, put it on USB-stick, and then install it on any computer.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

  • Enter your email address to follow this blog and receive notifications of new posts by email.

    Join 105 other followers

%d bloggers like this: