How to install software in Ubuntu

Ubuntu

So, you've heeded the security warnings, run Ubuntu's update manager and you're happy that your system is now bang up to date with the latest whizz-bang software. But is it?

The truth is that packages are only added to Ubuntu's main repository as and when the maintainers deem them stable enough, so often users are left for months waiting for packages with the latest killer features. You can download these packages and compile from source, but you then have the trouble of satisfying the list of dependencies. Also, when you come to update the package you've compiled from source, you have to purge the current install from the system, satisfy any new dependencies that have sprung up, apply patches and then recompile, which is a messy solution.

Ubuntu Personal Package Archives (PPAs) are APT directories provided by third parties on Launchpad (Ubuntu's third-party developer platform). This is where the latest and greatest software is bundled into a Debian package and made available for download. The likes of Google and the Wine community are well known for using this service, so if you'd like to take advantage of their hard work and install some cracking new software for your Ubuntu, read on...

The big advantage of using a PPA over simply downloading a package from the project website is that you can update it using Synaptic as if you'd installed it from the main repositories. Also, the update will verify itself using a GPG signature, so you can have the added peace of mind that the package you install is genuine and that it has downloaded and installed correctly.

Notwithstanding the many good reasons to add one of these directories as a software source, we'll begin by installing Google's popular open source browser Chromium.

PPAs bring with them the latest and greatest features, such as the ability to make Chromium look much prettier than the standard version.

PPAs bring with them the latest and greatest features, such as the ability to make Chromium look much prettier than the standard version.

Installing Google Chromium

To make Chromium available to install and update you'll need to head to System > Administration > Software Sources. Then open the Third Party Software tab before clicking on Add. Next, add both of these as two separate APT lines:

deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main

We wrote this using Ubuntu 9.04, hence the "jaunty" in there, but you can substitute "karmic" for 9.10 and sometimes even "intrepid" to get software for 8.10.

Now we have the APT lines we can optionally import a GPG key to verify the download. Chromium will install without this, it but we recommend you do this if you want to avoid invoking an error message at the end of each update (and for the added security, of course). Fire up a terminal and type the following command.

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 4E5E17B5

This fetches the key identified by the code at the end of the line from the Ubuntu keyserver. Once the key is downloaded it's imported into Synaptic's key list, meaning that the next time you come to install or update Chromium you can verify that the packages are from the original source.

Now that we've fully installed a PPA and imported the GPG file we can fire up a standard terminal and type:

sudo apt-get update
sudo apt-get install chromium-browser

This updates the cached package lists in Synaptic then installs the Chromium browser. You should now see a menu entry for Chromium under Applications > Internet. Installing an Ubuntu PPA follows a relatively uniform procedure whatever package you want. For example, to install the latest version of Wine via its Launchpad mirror we can use the following APT lines:

deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu jaunty main 

and we can then use this to import the GPG key:

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com F9CB8DB0

To finish, run the update and install as we did in the previous example. You will see from these code snippets that the only real changes tend to be the address of PPA folder and the value associated with the GPG key.

Installing a third-party repository

Even now you're likely to encounter the odd situation where there is no open source solution to a problem. This could be the ability to play DVDs, open a particular file format or access features that are only available in commercial versions of software.

The Medibuntu repository provides software the Ubuntu developers don't include by default for legal reasons.

The Medibuntu repository provides software the Ubuntu developers don't include by default for legal reasons.

While we would in the interests of freedom always advocate VirtualBox OSE (Open Source Edition) you can have access to more features in the non-free Sun VirtualBox, such as USB, SATA and remote desktop support. We can use Sun's third-party repository to get the latest release by heading to the same place we added our APT lines before, but this time we'll add the following:

deb http://download.virtualbox.org/virtualbox/debian jaunty non-free

Feel free to change jaunty to your particular Ubuntu version's codename. Now download the GPG key from http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc and open a terminal. After navigating to your desktop, enter the following commands:

sudo apt-key add sun_vbox.asc
sudo apt-get update
sudo apt-get install virtualbox-3.0 dkms

These lines add the GPG key you've just downloaded to Synaptic's key list as before, then updates its package list. Once the package list is updated you can install both Sun VirtualBox and the dkms package (the latter ensures you have the latest VirtualBox host modules).

With Sun's VirtualBox enabled from a third-party repository, you too can admire the glory that is Windows Update.

With Sun's VirtualBox enabled from a third-party repository, you too can admire the glory that is Windows Update.

No Ubuntu PPA?

If you can't find an Ubuntu PPA or third-party repository to get the latest version of your software, all is not lost. Some developers still package each component and dependency appropriately for offline installation so we can avoid compiling from source. In the following example we can quickly install the latest version of OpenOffice.org. Download the latest package from http://download.openoffice.org and then extract the tarball as normal.

When you take a look inside the DEBS folder you'll see a huge jumble of Debian packages with no indication of which one will be the magic bullet and satisfy all the dependencies. Thankfully there is a one-line command you can use to solve this problem. Start a standard terminal session and navigate to this folder before typing:

sudo dpkg -i *

The package manager will then cycle through each Debian file in the correct order to satisfy all dependencies and install the packages. There's also a sub-folder in the DEBS directory named Desktop Integration, which you'll only need to bother with if OOo isn't already installed on your distro, as this will mess with your interface and may conflict with other packages.

So, to summarise you can install third-party applications in Ubuntu using PPAs from Launchpad, a dedicated repository or from a collection of Debian packages you've downloaded through a browser. With these new-found skills, you should find you need to install far fewer packages from source, meaning you will spend much more time working with your applications rather than installing them.

Not for the faint-hearted

We'd like to make it clear that, as a general rule of thumb, if a package isn't in your package manager then there is usually a reason for it. It could be that it's not free enough, legally questionable or, more importantly, not entirely stable on your chosen platform.

If you have a mission-critical system, we strongly recommend that you do not install third-party software sources, and wait for package updates to arrive in your package manager. In short, stick with Synaptic, because it's good enough for most users. However, for those of you who tinker with Linux as a hobby or simply want to be on the cutting edge of what the Linux software community can offer, the rewards are well worth the time and effort.

First published in Linux Format

First published in Linux Format magazine

You should follow us on Identi.ca or Twitter


Your comments

Thank you for chromium key. it started to annoy me...

and thank you for article... useful

Outdated!

This information is outdated now since 9.10 has simplified adding new repos.

The correct command to

The correct command to install ppa's on the command line is:
sudo add-apt-repository ppa:NAMEOFPPAGOESHERE

To install Chromium:
sudo add-apt-repository ppa:chromium-daily
sudo apt-get install chromium-browser

Kubuntu PPA

KDE4 is new and in my opinion KDE 3 has wiped the floor with any other desktop (featurewise) for years and so you will likely get more stability by using the PPA than less (normally). Beware though, the new 3d acceleration in kde4 may need to be disabled on old radeon Hardware, more so with the updates.

Jon: woops, thanks for

Jon: woops, thanks for correcting me. I should really test out what I type next time.

What's new?!?!? What's Old?!

I just converted over to Ubuntu Linux like a month or two ago and I'm glad to find websites willing to walk me step by step through the different ways of doing things on this OS so... Thank you for an informative post. I'll eventually pick up the new ways of installing "packages" & doin' other things... but I kinda wanna learn the old ones first/to.

комментарий

хорошо оплачиваемые фотомодели для рекламных проэктов

Upgrade please

I understand that Ubuntu is free OS but seriously guyz u need to upgrade this OS, i like but i need more serious feature on it. It pointless to have a OS that works with internet only.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

CAPTCHA
We can't accept links (unless you obfuscate them). You also need to negotiate the following CAPTCHA...

Username:   Password:
Create Account | About TuxRadar