Ramblings of a Professional Computer Geek

October 1, 2008

Software Installation In Linux

Filed under: Linux,PCLinuxOS — Padma @ 2:05 pm
Tags: , , ,

One of the complaints I still hear from new (or non-) Linux users is that installing software is too hard.  The usual case in point is that in Windows, they just do an online search for what they want, download the installer, and double-click on it, and, after a few ‘OK’ clicks, voilà!  Or they just go down to the store, plunk $50 on the counter, take the CD home, insert it into the drive, and, again, after a few ‘OK’ clicks, voilà!

In reality, software installation in Linux can be even easier.  It can also be much harder.  It depends on what level of responsibility you want to take.

As I see it, there are currently four ways of installing software in Linux.  I’ll look at each of them in turn.

1. Use the distro’s package manager.  Virtually every major distro uses a package manager associated with repositories of software that can be installed.  The graphical tool used for it may be called Synaptic, or Yum, or RPMdrake, or any of many other names.  But they all work in pretty much the same way.  The user selects one or more repositories from which to download software.  He then uses the tool to search the repository for desired software.  Once found, he selects it for installation, and then clicks an ‘Apply’ button.  The package manager then downloads the requested files, resolves any dependency issues, installs the software, and finally updates its database of what is currently installed on the machine.

Updates are handled the same way.  Since the tool keeps track of what is installed on the machine, all it takes is a refresh of the repository data, and it knows what software needs to be updated.  Click to select, click ‘Apply’ and it’s done.  What could be simpler?

Of course, some people (correctly) point out that the software in a given distro’s repositories isn’t necessarily the most current version of the software.  Or it’s not available for their specific distribution.  What to do?  That leads us to our second method.

2. Directly install the package from an outside source.  One can search for software online, just like Windows users do.  Sites like rpm.pbone.net, and rpmfind.net can point you to packages for rpm-based distros like RedHat/Fedora, Mandriva, and PCLinuxOS.  Similar tools exist, I am sure, for debian-based distros, like Ubuntu and Mepis.  There are even tools, like alien, for converting one package format to another.

Once the package has been downloaded, it needs to be installed. For rpm-based distros, this is done with the rpm command in a console window.  Alternatively, there are some guis available for it.  I use kpackage to install non-repo rpms.  But, command-line or gui, it is up to the user to resolve any dependencies the package may have.  Fortunately, whether I use kpackage or ‘rpm -i’, the package gets added to my package database, so Synaptic knows it’s there.

There is a third method of installing software that is used primarily for commercial products.

3. Non-package-specific binaries.  These are installers that are bundled with the software (usually).  I have used these to install Sun’s Java, ATI drivers for my video card, and some commercial Linux games.  With these, the software is downloaded (or the CD inserted), the file may have to be made executable, and the file is then run.  The install may run strictly on the command line, or it may pop up a simple gui dialog box to show progress and ask questions, much like a Windows install.  All dependencies must be either met prior to installing, or are included in the installation file(s).  If they are included, they are normally written to ‘non-standard’ locations, like a sub-directory of the installation location, so as to not interfere with the existing ‘standard’ versions.  Some of these installers are even smart enough to insert entries into the ‘Start’ menu.

One thing these installers do not do, however, is tell the package manager that they are there.  It is up to the user to track updates, and manually install them, if necessary.

There is one final method for installing software in Linux.

4. Install directly from source.  This is the one that gives Linux a ‘bad name’.  A lot of us old heads know the mantra of “./configure; make; make install”.  This is useful if one really, really wants the most recent, bleeding edge version of a given open-source package.  But this should be done only if one knows how to resolve make/compiler error messages.  The appropriate compiler must be previously installed (probably gcc, but occasionally something else).  All necessary libraries must be pre-installed.  And, if all works well, nothing is put into the menu system.  The package manager knows nothing about what was done.

(To be fair, some distros, like Gentoo, install everything from source.  But its ’emerge’ program is designed to act like a binary package manager in all other ways.)

So there are the four primary means of installing software in Linux, ranging from the easiest, to the hardest, most demanding of user knowledge and interaction.  Which method(s) to use is up to the individual user, and how much effort they want to put into maintaining the health of their system.  Using the package manager is the safest, most stable way to install software and keep it up to date.  But if that isn’t sufficient, then there are other ways, as well.

A final caveat: installing anything outside the distro’s repositories can cause problems for the system.  In particular, the libraries needed by the ‘strange’ software may clash with the pre-existing libraries and programs installed by the package manager.  So you may have the latest version of ‘Program X’, but now ‘Program Y’ no longer works correctly.

Advertisements

4 Comments »

  1. Thanks, this needed to be laid out and you did a good job. It amazes me how some people deride Linux software installation while touting the Windows method as superior. Often times the person on the receiving end of this nonsense has more Windows time then the abuser.

    Comment by Richard Chapman — October 1, 2008 @ 2:52 pm | Reply

  2. […] Go to the author’s original blog: Software Installation In Linux […]

    Pingback by Software Installation In Linux — October 1, 2008 @ 4:35 pm | Reply

  3. Great blog you have here Padma, and very useful.

    I think I’m gonna be a regular 😉

    Comment by Crow — November 11, 2008 @ 12:06 am | Reply

  4. Thank you, Crow.

    I wish I could promise to be more regular in my postings.

    Comment by Padma — November 11, 2008 @ 9:04 am | Reply


RSS feed for comments on this post. TrackBack URI

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: