How To Install New Software On Ubuntu

Making Music With Open Source Software

More Topics:





Part 1: Installing New Software On An Ubuntu System

Installing Software on Ubuntu

Installing software on a Linux-based operating system is, in some ways, easy and in other ways a little more tricky than installing software on other popular operating systems. This is partly due to the amount of various options that exist when using a system that identifies itself with open source philosophies. For example, as a user of such a system you will probably also have access to the source code of many programs that you wish to install. This is the norm when using Linux-based operating systems and not very common when using proprietary operating systems. Subsequently you are provided with more than one choice regarding the installation of your new software.
There are four main options I'll discuss relating to installing new software on Ubuntu.

1.) Synaptic Package Manager

Synaptic is a package manager which has the function of taking care of installing Ubuntu/Linux software for you. Basically you search for the software using Synaptic and choose to install it, Synaptic then takes care of all the details of the installation process.
If you are connected to the Internet and don't need to be too concerned about increased data usage, this option can be very useful. Even if you don't have a high data cap this option can still work out to be the best, as software for Linux-based systems can be surprisingly small in size.
It is certainly the easiest way of installing new software on an Ubuntu system and subsequently my first recommended option for this task.

Synaptic Package

Synaptic can be accessed from System -> Administration ->Synaptic Package Manager

Do a search for the name of the software you would like to install, right click on the name of the software and choose "Mark for Installation".

Generally most large packages will require that other smaller packages also be installed to get the full functionality (or any at all) out of your new software.
Software that is required to make other software work is referred to as "dependencies" on Linux, This is a word you will probably hear quite often when installing new software on any Linux system. When you choose to install certain software through Synaptic, it will tell you exactly what dependencies are required to make your new software work. It will ask you if you would like to install the dependencies when installing your new software. It's generally best for new users to follow Synaptic's suggestions and click on the button that says "Mark" in the resulting dialog box.
In some rare cases the software you are trying to install might conflict with software that you currently have installed.
In that case Synaptic will suggest to you that you uninstall the conflicting software before proceeding. This is yet another great feature of Synaptic's package management system, as it will actually uninstall the conflicting software for you including any conflicting dependencies. However, it's worth noting that you should proceed with caution when choosing to uninstall certain packages as this act might render software that you require unusable.
Read through the list of conflicting packages Synaptic provides you with before proceeding, and if you cannot uninstall the conflicting software you might have to consider using an older or newer version of either one of the conflicting packages (but not both) in order to prevent the conflict.

When ever I want to install new software I'll always check if it is available through Synaptic first, before attempting to install the software through other means. There are, however, some cases when the software that you are trying to install is not available through Synaptic, this might be the case when you are trying to install software that is very new and not available in the Ubuntu software repositories yet (which Synaptic is set up to access automatically), but don't worry about having to wait for the software to become available in the repositories before you can install and use it because there are other options, if it is absolutely necessary for you to have that particular software installed on your current system.
Ubuntu will often have in excess of 30000 packages available for installation through Synaptic and this number grows significantly with each new release of Ubuntu, so there is generally a good chance that the software you are trying to install can be handled for you by Synaptic. If there is a more recent version of the software you are trying to install than is currently available through synaptic, this is generally because the newer version has not been fully tested on the current version of Ubuntu you are using, you will probably still be able to install the newer version but be aware that it might turn out to be buggy and as such is generally a better suggestion to use the version that is available through Synaptic.

1a.) Ubuntu Software Center

Ubuntu Software Center is a relatively new option to installing software in Ubuntu. It's main purpose is to simplify the software installation process on Ubuntu by incorporating options from other software installation packages and adding new functionality such as the ability to install non-free software, and pay for it in one simple interface.

Ubuntu Software

Ubuntu Software Center can be accessed by clicking Applications -> Ubuntu Software Center from the Gnome Panel.
As it is a relatively new feature in Ubuntu not all versions of Ubuntu and it's derivatives come with Ubuntu Software Center installed. If you have a version of Ubuntu that is greater than 9.10 Karmic Koala, you should have the option to install Ubuntu Software Center using Synaptic if it is not already installed. Do not attempt to replace Synaptic with Ubuntu Software Center, the two packages can work side by side on the same Ubuntu installation quite effectively. Installing software using Ubuntu Software Center is really easy and can make the process of installing software in a Linux-based operating system fun and informative. You will generally need an internet connection to use the Ubuntu Software Center.

1b.) APT (Advanced Packaging Tool)

Another option for installing new software that does not require a GUI is using "Apt (Advanced Packaging Tool)" through Terminal. To the new Linux user there is no obvious benefit to using this method other than not having to use a GUI, unless you know how to supply "apt" with arguments to customize an installation and generally most new users to Ubuntu do not even know what "apt" is let alone how to supply it with custom commands. However I have listed the usage of "apt" as an alternate to Synaptic because once you become familiar with using a few simple commands it can be more beneficial (in terms of speed and ease of use) than using other installation options , including those that have GUI's.
Like I said earlier it's all about choice in Linux, and this option seems to be a very popular choice for many people using Ubuntu at various different levels of skill.
You can open the Terminal through Applications -> Accessories -> Terminal From the Gnome Panel.


Once you have Terminal open you can start to use apt.  Apt comes with every Ubuntu installation (in fact apt comes with every Debian based distribution, this is particularly applicable to Ubuntu because Ubuntu is based on Debian). Apt is used mainly to install packages and bypass package managers that require a GUI such as Synaptic. Despite the fact that apt has no GUI it is actually easier to use than you might think. Apt is great because it handles all dependencies for you, just like synaptic and does not require you to be specific with naming conventions when referring to packages, for example if I wanted to install the package "libc6" I do not need to know that the actual name of the package as it is listed in Ubuntu's repositories is "libc6_1.9.6-2.deb" apt is smart enough to realize what I'm trying to install. This generic approach to naming can be very useful as often different distributions refer to the same package with different names, having your software take care of these discrepancies for you can be a massive time saver. To install a package through apt you will need to know the name portion of the package. For example say the name of the package I wanted to install is called "someSoft". To install this package all I simply type in terminal is,

sudo apt-get install someSoft

Note that the command is case sensitive and the first part of the command "sudo" (pronounced "soo-doo" rhymes with "who") is short for "Super User Do". A Super User on Linux-based operating systems has system wide access, and you will need to input your password when using a command starting with "sudo". You should not compromise the integrity of your system by giving other people your password on Linux, even if their intentions might not be malicious having super user privileges on a Linux-based operating system can be damaging on an unfamiliar system. It is therefore better to perform all sudo tasks yourself if you are the administrator of your own system.
Finally you will need to be connected to the Internet or have offline packages (listed in your software repositories) stored on DVD/CD before entering this command.
Apt will then proceed to tell you what it needs to do on your system, since it is a package manager it will try to obtain all necessary libraries and dependencies, and resolve any potential software conflicts. It will do this in the most logical way possible, and not simply install "software A" first because it is chronologically before "software B". For now the most relevant apt command is "sudo apt-get install packagename", however it is worth mentioning that apt also has the ability to upgrade packages (without having to reinstall them and handle the upgrade of required dependencies) and also update the list of packages available to you via the internet.

2.) Extracting Pre-Compiled Software

The second option for installing packages if Synaptic or apt is not available, is to not perform an installation but a simple archive extraction of an already pre-compiled version of the software you are trying to "install", in the sense that...
A compressed achieve containing the pre-compiled software has been provided on the software developer's website specifically for your version of Ubuntu. These achieves will contain the software you are trying to install in a pre-compiled format, meaning that you do not have to compile the application yourself from source code (which we will get to a bit later). These archives will usually have an extension like .tar.bz2 or .tbz2 (these archives are sometimes referred to as tarball archives) or sometimes they might even have the extension .zip which is less common on Linux.
You will need the standard Archive Manager that comes with Ubuntu in order to perform an extraction, obviously there is also a command line tool for extracting archives but we'll be examining the GUI method since this guide relates to what has been most effective for me as a new Ubuntu user, your experiences may differ.

Archive manager

A Side Note on Desktop Environments and Archive Managers

The archive manager for Kubuntu is called "Ark". Kubuntu is basically the same as standard Ubuntu just with a different desktop environment using "KDE", this is as opposed to the standard Ubuntu which uses the desktop environment, "Gnome". Both of these desktop environments can be used on the same workstation and switching between them is easy as logging in. Furthermore when switching between them you don't even have to restart your computer.
A desktop environment provides a higher level of abstraction on top of a basic operating system, this means it will include themes that unify the design of various packages used in that operating system and even provide a set of packages that contribute to defining that operating system's behavior.
This should not be confused with Unity (in more current versions of Ubuntu) which is a shell for a desktop environment, particularly the Gnome desktop environment (but this is only applicable for Ubuntu 11.04). Versions of Ubuntu greater than 11.04 will more than likely not include Gnome. Unity provides a higher level of abstraction (to that of a standard desktop environment) to enrich the end users experience with the operating system, meaning it provides consistency between different applications for the end user mainly in terms of design. Nonetheless whether you are using Ubuntu (standard version), Kubuntu, Ubuntu Studio or other Ubuntu derivatives they all come with their own archive managers.


To start using the new software you will first need to download (or obtain by other means) the archive file containing the new software in it's already compiled format. Extract the contents of the archive to a logical location in your home/username/ directory. I suggest making a directory in your "home" folder under your login name called "software" and extracting all software that does not require an installation to that folder, this has worked most effectively for me.
Once your new software has successfully been extracted, you'll probably want to try it out. The methods of extracting software differ slightly from one archive manager to another, nonetheless they are pretty standard across any platform so I won't be discussing how to use their GUI's. 
There will generally be instruction files on how to use the software (once it is extracted) in the form of an "INSTALLATION.TXT" file or a "README.TXT" file I would suggest reading these before proceeding, particularly as it might not be so obvious as to which file is the executable you need to double click in order to use the new software. Once you've identified which file the executable is you need to make sure that you have permission to execute the file. If you do not have permission to execute the file you can double-click the file as much as you like and not much is going to happen. To confirm that you have permission to execute the file, right click on it and choose "Properties" click the "Permissions" tab. You're login name should be listed as the owner, just below that is a selection box for Group then a cluster of checkboxes. The checkbox relating to Owner that reads "Execute" should be checked. Once that is confirmed click "Close" to dismiss the dialog box, and you should be able start your new software by double-clicking the executable.


The main setback with using this method to run new software is that it does not create a system wide installation so you cannot run the software from terminal without having to enter the location of the file preceding it's executable name. Most of the time this is not really an issue (or rather hasn't proven to be an issue for me). So why is this not the main method for running new software on Linux, largely because you are not installing the new software and therefore not using a package manager and therefore you need to handle the new software's dependencies yourself. What this means is that in the README/INSTALL file there might be a whole bunch of dependencies listed. Those dependencies will need to be installed (not simply extracted) on your system before you can use your new software. If you are having problems getting your new software to work after having followed these instructions then you might very well have dependency issues. You will need to find out what dependencies your new software requires and install those dependencies if you wish to get your new software working. The first place to look would be the website of the software developer of who's software you are trying to install. This is usually the best place to start and they usually list all dependencies on their websites. Please note that they will simply indicate what dependencies are required and not actually have the dependencies available for download from their websites. This is largely due to the fact that they will not be the developers of the dependencies themselves, simply of the software that requires those dependencies. The dependencies will subsequently need to be obtained from another location such as the dependencies' developers' websites or an Ubuntu software repository accessible preferably through a package manager such as Synaptic.
Another place to check is to do a search on http://ubuntuforums.org/ as you will find someone has more than likely run into the same issue you are having with the installation of your new software, and a solution might already have been documented. Using the forums is easy and I recommend setting up your own account which is quick to do and free. As simple as your questions might seem as a novice user, there is more than likely someone else out there that has the same question and could benefit from your posts.
Finally there's always Google, actually Linux support on Google is really good!
Once you have identified what dependencies are required you should try install them through Synaptic. Be aware that some dependencies might in themselves have their own dependencies, in that case those dependencies will need to be installed too.

3.) Binary Package Installation

The third option for installing software on Ubuntu , is to install from a .deb file. These files are sometimes available from the software developers website of who's software you are currently trying to install. A .deb file is a neatly packaged single file with the extension .deb. Installing software from a file of this type differs from archive files mentioned in option 2 as .deb files actually install the new software not simply unpack archived files to a user defined location. The benefits of installing with this option is that your new software is now installed system wide, meaning that you will be able to run the new software once installed by typing the system wide command for running the new software without having to point to the location where the new software is installed. This might seem a little trivial at first, but having software properly installed on an Ubuntu system means that it will also be easier to associate files with the newly installed software by simply double clicking on the associated file you will be able to launch the newly installed application and open the file that you have just double-clicked in the new software.
In order to install from a .deb you will need an application such as gdebi (which comes standard with both Ubuntu and Ubuntu-Studio). These files (*.deb) come from the Linux developer distribution called Debian which is what Ubuntu is based on, so a lot of what works on Debian will also work with Ubuntu. .deb files are often referred to as a type of binary package. It's worth noting that if you have the option to install a Debian version binary or an Ubuntu version binary you should choose the latter (although there will not always be a difference between these two file versions).
Installing from a .deb is easy simply download (or obtain the file by other means) and double click to open the file Ubuntu will automatically open your Debian package installer with an interface similar to this...

debian package

Ubuntu lists the package name and a Status field. The Status field in this case is actually quite important as it will indicate if dependencies are required that need to be installed before installing your new software. gdebi unlike Synaptic is not a package manager it is simply a Package Installer. Therefore if there are dependencies that are not satisfied on your system, gdebi will tell you what those dependencies are and you will have to download (or obtain by other means) and install the required dependencies before continuing. Be aware that the Status line tends only to reveal one dependency at a time, when several dependencies might be required,  before installing the new software. Once the Status line reads "All dependencies are satisfied" you can click the button that reads "Install Package" and the package should install to the appropriate location and create the correct system wide file associations and links.

3a.) Converting a binary package to a Debian compatible version

Another type of commonly available binary package file exists for Linux other than .deb, these files have the extension .rpm and are oriented towards the Linux Red Hat distribution. Red Hat is not Debian based, so if your only option is to install from a .rpm file you will first need to convert the .rpm file to a .deb binary package and install the new software from the newly created .deb file.
So how does one go about creating a .deb file from a .rpm file? You will need another package in order to do this. The most commonly used package for this task is known as "alien". The latest versions of alien can be found here. But I recommend that you install alien through Synaptic. As alien is written in Perl it has it's own set of dependencies which Synaptic will be able to sort out for you. I have not come across a distribution of Ubuntu that does not have alien listed in it's software repositories, so you should have no problem installing alien through Synaptic. However if you are lacking an Internet connection and/or repositories available offline (in the form of DVD's or CD's) then you will have to do a manual installation as outlined in one of the other installation options (i.e. obtain the alien binary, source files, or archive and it's dependencies and install the relevant files before proceeding). Once you have alien installed you are ready to convert the .rpm file to .deb.
I'll list a brief outline on how to do this as there are numerous articles online that demonstrate this installation technique. The easiest way to perform this conversion is to

1)Open Terminal

2)Change to the directory that the .rpm file is in either with the cd command (change directory) or open the location in Nautilus (the standard Ubuntu file manager) right-click on a blank area within the appropriate directory and choose "Open in Terminal" if you have this option available. Terminal will now open at the appropriate location.

3)Converting the file to a .deb does not have to be complicated, simply type the command "alien" followed by the exact name of the file you would like to convert, including the files extension for example if I have a file called "someSoft_1.6.rpm" that I'd like to convert to a .deb I'd simply make sure I'm at the correct location as outlined in the previous step then type...

alien someSoft_1.6.rpm

This will create a file called "someSoft_1.6.deb" in the same directory. You are now ready to install the .deb binary using the previously outlined steps in option 3 Binary Package Installation.

4.) Installing from source

The final suggestion for installing new software on Ubuntu is to install from source. This option is actually not as daunting as it may initially seem for those that are unfamiliar with Linux.
Firstly what does it mean to install from source?
Installing new software from source is an option that one does not generally have on proprietary operating systems, this is generally because software that runs on proprietary operating systems tends to be (not unlike the operating system it is written for) that being "closed" source. This means that the source code used to develop the software is not publicly available or not available at all. This is particularly relevant to software developers, nonetheless if you have exhausted all other options and the only option left for you to install your new software is to install it from source then this option might prove to be useful to you. Firstly you do not have to be a software developer or even know how to write code in order to install software from source. What you will however need is the source code to start off with once again this is usually available from the software developers website or sourceforge.net. You will also need the dependencies required to install the new software. The best way to find out what dependencies are required is to look for a listing of required dependencies at the software developers website of who's software you are trying to install or do a search on ubuntuforums.org for help with software installation issues.
Once you have all required dependencies and source code, install the dependencies first (preferably through Synaptic). If you are not sure about what dependencies are needed this might not be particularly problematic, as when you compile the new software you will get an error message telling you that a dependency has not been satisfied just before the configuration stage of the compilation process exits. At this point you will at least know the name of the dependency and you can subsequently search for it.
Software can be written in many different languages, but C/C++ is a popular choice for a lot of different varieties of software packages, particularly those found on Linux and this is largly due to the portibility that the resultant C/C++ source code offers. Subsequently before compiling your new software you will need a software compiler that supports C/C++. I recommend installing
"make" (a dependancy solver),
"gcc" (which is the GNU C compiler) and
"g++" (the GNU C++ compiler), along with all their dependencies.
The "build-essential" package offers a general purpose solution for installing software from source. As installing this package should also install the packages listed above amongst other required software it is recommended that you first install "build-essential" in order to keep things simple. Nonetheless, the four noted packages will be a minimal set of requirements (in most cases) for installing software from source. For some software the developers might recommend "scons" as a replacement for "make". This software will be available from the Ubuntu repositories through Synaptic. Bear in mind that once you have all of this software installed and working you will not need to reinstall it (unless something were to corrupt your installation), so this part of the configuration process is something you need, only do once. Compiling software becomes easier to accomplish with time as a lot of dependencies that are required by one application might in fact also be required by other software you are trying to install at a later stage. In this case you will not need to reinstall those dependencies.

Once you have downloaded the source code there will generally be a file called "README.TXT" or "INSTALL.TXT" in the main directory. If there is such a file, I recommend reading it as it will usually contain critical information relating to the successful installation of your new software and also a good possibility that it will list required dependencies. One thing it might not mention is that when compiling certain software along with the required dependencies, you might also need their -dev (developers) packages. The -dev packages usually follow the naming convention "dependencyName-dev". So for example if I needed the dependency named "libxpm", and I'm compiling the software that requires this dependency from source, there's a possibility that I might also need the package named "libxpm-dev". If you are uncertain whether you will be requiring the -dev packages or not, I recommend waiting until it has been identified during the configure step of the make process (explained below) that this package will be required to proceed. Compilation will not be able to continue unless all required dependancies (including their dependancies and developer packages) are met so consider this suggestion to be a troubleshooting option in the event of certain compilation errors.

Sometimes dependencies are listed for a particular platform with a name that is specific to that platform, in that case be as generic as possible when searching for dependencies (where ever that may be eg Synaptic, the web etc), for example in a README file the dependency file "libjack100.0" might be listed however searching for this file in Synaptic might not turn up any results, and searching for it on the internet might turn up results only for other platforms (such as an rpm based distro). In this case the name you are searching for might be too specific (perhaps specific to another platform that is not Debian based). It is recommended that you try another logical variation of the name. In this case searching for the file "libjack" (with the numbers removed) in Synaptic will turn up several results of which the file "libjack0.100.0-0" is one of the results. As you can see the listed name in the README file "libjack100.0" is very similar to the Ubuntu listed name "libjack0.100.0-0" and it is therefore easy to ascertain that these files are equivalent to each other. Install the dependency as it is listed under it's Ubuntu name.

dependeny name
Synaptic Listed Name

dependency Name 02
README.TXT Listed name

Once you have downloaded the source code, installed all the dependencies and also installed a compilation tool for the specific language the new software you are trying to install is written in, you are ready to begin compiling the new software. If you have been able to satisfy the preceding steps then compilation should actually run along pretty smoothly and as it turns out is actually the easiest part of installing new software from source. The most common method of compiling new software follows...

If you obtained the source code in archive format, you will need to unpack the source code to a working directory. These archives are generally tarball files and will have an extension such as .tgz, .tar.gz, .bz or commonly in more recent times .tar.bz2.
For the sake of this example we will create a directory called "source" in the user's home directory (myName) and unpack the archive to this location.

Open up Terminal.
Applications -> Accessories -> Terminal

You can unpack the downloaded archieve using an archive manager listed above such as "Ark" or you could use a command similar to the following command (by changing the path and filename to suite your needs). This command assumes that you have downloaded the archive file to a directory called "Download" in the user's home directory.

tar jxvf ~/Download/packageName.tar.bz2 -C ~/source

When the archive has been unpacked you will find many new files in the source directory that will be needed during the compilation process.

In Terminal "cd" (change directory) to the location you unpacked your source code to. The original archive file you obtained earlier is no longer needed.

cd ~/source/packageName

Please note that all commands are case-sensative.
Once you are in the appropriate directory you should look for the README.TXT or INSTALL.TXT file and read it before coninuing (as mentioned earlier). You are ready to proceed with the next command, in Terminal type, (exactly as it appears in the box below):


Note that when copying text from Terminal the shortcut is "ctrl-shift-c" and when pasting text into Terminal the shortcut is "ctrl-shift-v", the text in the box above can simply be pasted into Terminal using these keyboad shortcuts.
Once you hit enter, Terminal executes this script and you should see a long list of output text appear, scroll upwards and get replaced with more output text. This is your new software communicating with your computer and inquiring about it's current configuration.
If there are any problems, such as dependencies missing Terminal will print **Error** to the screen and exit back to the command prompt. Be aware there are no visual clues (other than Terminal printing "Error" and indicating the nature of the problem) and there are no audible clues indicating an error either. In fact if it is the first time you have compiled an application an error can go by relatively unnoticed, that is until you try continue with the compilation and cannot get any further. Having said that it is important to note the last few lines of Output text printed to the Terminal before it stopped executing the "./configure" script if you do not see the word "**Error**" printed to the screen then you have more than likely successfully completed the configuration stage of compilation. However, if you do get an error it is worth noting what the error states and if it mentions anything about dependencies (which seems to be more often the case than not), or missing files, libraries or the like you will need to install those dependencies and software before continuing.
You can also seek help at ubuntuforums.org if you are unable of how to proceed.
Once you have successfully completed the configure process you are ready to proceed to the next stage of the make process, in the same Terminal window type,


make takes some time to create the files necessary to install your new software. It will also print out information about what it is doing in the Terminal. Once you have successfully run "make" you are ready to move onto the next command. In the same Terminal window type,

sudo make install

If you run into any problems during the compilation process, after checking the error messages that have been printed to terminal and before reattempting to compile the new software you must run:

make clean

If all went according to plan your new software will now be installed on your system. Generally when new software is installed you will find the executable file in /usr/bin/packageName. You will not need to create a "shortcut" to this file as you should be able to simply run the new software by typing it's name in any Terminal window.


You can also create a shortcut to running your new software from your Desktop with an icon. Right click on an empty area on your Desktop and choose Create Launcher...

Create Launcher

In this dialog box you can choose an icon for your new launcher, give it a name and description (comment field) and most importantly don't forget to type the command to launch your newly installed software using case sensitivity.

If for some reason or the other you wish to uninstall the software. Return to the source directory and type:

sudo make uninstall