Installing Software Packages Under Linux
This is the first in a series that is going to cover the installation of sofware packages under Linux. I'm going to jump right into this article by telling you that, for the most part, you won't need to be building packages from source. You can, but you generally don't need to.
The average Linux distribution CD comes with several gigabytes of software. SUSE, for one, delivers several CDs in a boxed set with enough software to keep you busy for weeks, maybe months. I'll tell you how to install that software, easily and without fuss. Despite all that your distribution has to offer, sooner or later you will find yourself visiting various Internet sites, looking for new and updated software. Where will you find this stuff, and will installing be the same as getting it from your CDs?
Before we get into finding, building (yes, I'll tell you how to do that too), and installing software, I'd like to address a little myth. You have no doubt heard that installing software on Linux is difficult and that it is inferior to what you are used to in the Windows world. Nothing could be further from the truth. In fact, software installation under Linux is actually superior to what you are leaving behind in your old OS.
When it comes to installing software, security is something we should talk about. I've already said that you should know where your software is coming from, but that is only part of the consideration. That's why I'm going to clear up some bad press Linux gets when it comes to installing software.
In the Windows world, it is frighteningly easy to infect your PC with a virus or a worm. All you have to do is click on an email attachment, and you could be in trouble. With some email packages under Windows, it does the clicking for you and by being so helpful, once again, you could be in trouble. You won't find many Linux packages provided as simple executables (.EXE files and so on). Security is the reason. To install most packages, you also need root privileges. Again, for security reasons. Linux demands that you be conscious of the fact that you might be doing something that could hurt your system. If an email attachment wants to install itself into the system, it will have to consult the root user first.
Package managers, such as rpm (a recursive acronym that stands for "RPM Package Manager"), Fedora's yum, or Debian's apt-get, perform checks to make sure that certain dependencies are met or that software doesn't accidentally overwrite other software. Those dependency checks take many things into consideration, such as what software already exists and how the new package will coexist. Many of you are probably familiar with what has been called DLL hell, where one piece of software just goes ahead and overwrites some other piece of code. It may even have happened to you. Blindly installing without these checks can be disastrous. At best, the result can be an unstable machine—at worst, it can be unusable.
Installing software under Linux may take a step or two, but it is for your own good.
So how do you identify which package is right for your system?
The simplest way is to install software from the CDs that came with your particular distribution. Even the most modest Linux distributions out there have literally hundreds of packages and most have some friendly method to help you deal with the installation of those packages. What most major Linux distributions have in common is the concept of a package -- a pre-built bundle of software ready to be installed on your system. Despite the numerous distributions out there, most use the same package management systems. They will often have different ways of dealing with them, but the packaging system remains pretty consistent. With the exception of Slackware, pretty much all distributions use either the RPM format of packages or DEB. Before we get into installing packages, I'm going to show you how you can identify one type of package from another.
Assume that I am talking about a hypothetical package called ftl_transport, a package I'd love to download into my car when I'm stuck in traffic and already an hour late. If I were looking for this package to run my Debian or Debian-like system (such as Xandros or Libranet), I would find it in this type of format:
The first part is the package name itself. The numbers just after the underscore (and just before the hyphen) indicate the software version number. The number following the hyphen is the package release number. Following that is the architecture for which the package was compiled, i386, in this case. By the way, that implies any machine from an old 386 on up to super-fast Pentium 4s. The final prefix, .deb, is a dead giveaway that this is a Debian package, sometimes referred to as a deb.
Those of you running Fedora, Mandrake, SUSE, or one of the other RPM-based distributions will find a similar format.
As you can see, the format is similar to that of the deb package, but with a couple of fairly important differences. For instance, hyphens denote both versions and release numbers. As you might have guessed, .rpm denotes an RPM package and while that is an important distinction, the following is somewhat more interesting. The i386 portion of the package name tells us that it was compiled for a generic x86 processor family. You might also see an “i586