The title of this entry is an old joke born in times when package managers were not yet invented. All administrators thus had to know how to install programs from the source with the now well-known, and even famous sequence of commands, the "rule of three":
./configure make make install
Now, you can still install programs in this old-fashioned but canonical way. But aren't there better ways?
Oh yes, and we are all using them: they are called package managers. They did away with the dependency hell, which was the source of constant irritation in the early days of Unix before the development of package managers dealing with dependencies (that, by the way, is just a decade ago). Ian Murdock called package management the single biggest advancement Linux has brought to the industry, and I fully agree. It's the prime reason why I'm using Linux and not MacOS.
You now may understand why I principally consider the above "rule of three" as the last resort. Bypassing the package management is always possible, and in the rare cases I do that, I install everything in /usr/local as recommended. Yet, this should be done in exceptional cases only, and not become the standard. Remember that these self-installed packages are not part of the automatic security updates offered by your package manager, nor can they be cleany removed in an automated way. In other words, these packages need to be looked after and pampered, and I just don't want that on my system.
But what to do if your distribution simply doesn't offer a package you're interested in, or only a grossly outdated version?
There are a number of possibilities, and there's an helpful tool which helps to explore some of them.
- First of all, I always check whether the tarball of the program I've just downloaded contains a *.spec file. Then, a simple 'rpmbuild -ta
.tar.gz' might suffice to create a binary rpm out of the tarball . You can then install this rpm with the package manager of your liking. 😉
- Second, if there's no *.spec, or if compilation fails, there's a high chance that alien will work. For example, my versions of gdis and gwyddion are both the offspring of a conversion from a debian/sid package to an rpm by alien. To find out whether the desired program is somewhere out there, you can use whohas as mentioned above. Beware: the script does not run out of the box. One needs to specify the version numbers of current distributions in line 50 ff, and currently it is also advisable to deactivate mandriva and slackware (just underneath, switch to zero). In any case, after you found the package you need by whohas (which tells you the address!) and downloaded it, simply run 'alien --to-rpm --scripts
.deb' and install the resulting rpm by your package manager. Or vice versa: 'alien --to-deb --scripts .rpm'
- Third, you may, in exceptional cases, also install packages build for another distribution. Fedora packages, for example, can often be installed on Mandriva and vice versa. However, you should only do that if you're versed in this business, as it can easily wreck your system.