We have already shown you how to install software on Ubuntu without an Internet connection by compiling software on it. However, we believe we have also demonstrated that resolving dependencies and installing them before the software in need is a task challenging enough to make those tremble who use pacemakers to keep their heart running. It was this reason that package management was invented. Package manager like YUM and APT were created to be able to install a pre-compiled software package on computers and keep track of them. Since Installing software by source also takes a lot of time depending on the machine configuration and the amount of code, package management came up as a better solution.
It was because of such inventions that Ubuntu enjoys the ‘search-click-go’ style for software Installation.
However, this style involves heavy use of The internet, which for some is still a luxury, leave alone the matter of unlimited downloads and high speeds. If you think that it is going to be very tough, you are mistaken. It is even easier than our previous source code compilation method. This method is going to be a little different but not too tough.
Well, to begin with, ask yourself – how does someone install a software on Windows if he does not have it? In 99 out of 100 cases, the answer would be to download the software from the internet and run the set-up. Offline software installation for Ubuntu is not much different either. Although Ubuntu software center is what a user would prefer and the command line-apt-get is the friend of the one who loves to see everything happening in characters rather in graphs and bars. Synaptic is what you would need help from if you were to look for a method to install software without an Internet connection on the machine.
To be able to do so, follow the following steps:
- Launch Synaptic Package Manager. This can be done by typing “synaptic” in unity, and by launching “synaptic Package Manager” from the system Administration menu in Gnome.
- Once Synaptic is up and running (it takes some time to rebuild its search index). Search the packages which you want to install and mark them for installation. Synaptic might also ask for installation of other packages as dependencies. Confirm them. Do not press the ‘Apply’ button. In this example, we will try to install ‘audacity’ which does not come with Ubuntu in the default package.
- Go to the ‘File’ menu on the synaptic window and click on the ‘Generate Package Download Script’ This will open a new window asking you to save your file. The file is a txt file which can be executed as a shell script on Linux Machines.
- In case you want to use the shell script on windows or other OS save the shell script with the .txt extension. The point here is to be able to view contents if you have to. You can use any extension as long as you are able to do ‘open with…’ on the file and open it with a text editor. For the sake of the example, we will use the name ‘audacity.sh’.
- If you run this script on Linux machine with an Internet connection, it will download the required set of packages. However, let us assume that we are using a Windows based machine and still want to use the generated file. To understand the procedure, we will tell you a few things about the generated file. To understand the procedure, we will tell you a few things about the generated script file. The first thing to be understood is: the file is basically a shell script file. All it does is to call the ‘Wget’ program to download the required packages. Wget is a command line program which can be used to perform HTTP downloads. The generated script file simply calls the wget program with the address of the packages. If you open the script file with any text editor, you shall see the commands and of course, the URLs of the packages to be downloaded.
- Now you know the trick. All you have to do is to go to the nearest friend or internet accessible area with an Internet connection and download the packages whose URLs are mentioned in the script file. For Example, if a line says.
- wget -c http://us.archive.ubuntu.com/ubuntu/pool/universe/a/audacity/audacity-data_1.3.13-3ubuntu1_all.deb
then you should download using the link
- Once you have downloaded the packages, all you have to do is save them all in the same directory and put them on the same machine (the one with no Internet connection) and launch Synaptic again.
- Now, go to File. Add Downloaded Packages. This will open a new window where you have to select that directory where you have placed all your.DEB files. Remember that you cannot select individual DEB files in the selection window (It’s for selection of directory, not files). Synaptic will automatically install all of them and there to have it! The software is installed.
- Optionally you can also use the command
- sudo dpkg -i *.deb
in the directory where you saved all the .deb files.