Chapter 16. Command-Line Software Installation

This chapter introduces software installation at the command line. We'll focus specifically on command-line installs that are for command-line software because these are the variety that will be the least familiar.You should be aware, however, that some GUI software might require you to install it by using a command-line program such as tar.

Because of its long-standing position at the forefront of the Open Source software movement, the majority of traditional Unix programs are distributed as source code, rather than an executable application. If you're like most Macintosh users, you've probably never even looked at the code it takes to create a program, let alone tried to convince a machine to turn it into a fully-functional application. As OS X becomes more popular and more prevalent in the market, we'll probably see much more software distributed in precompiled form to appease those of you who really don't want to know this stuff. Until then, however, building your own really isn't that difficult.

The components needed to compile and install many pieces of Unix software right out of the box (or more accurately, right out of the ftp directory), are already located on your system. You need some support files that tell software how to interact with the hardware, the source for whatever application you'd like to build, and a compiler to build it with. In the good tradition of Unixes everywhere, Apple has provided the first and last of these for you; all that remains is for you to pick the software you'd like, and issue a few fairly standard commands.

Note

Just so you don't take this the wrong way—not all Unix software will compile as easily as what we demonstrate here. Apple has arranged some things in a sufficiently nonstandard fashion, so some software seems almost impossible to compile as of Mac OS X version 10.04. We expect that things will continue to improve over time, and that more and more software will compile cleanly. For the adventurous, Chapter 17, “Troubleshooting Software Installs, and Compiling and Debugging Manually,” will detail some of the steps that can be taken if things shown in this chapter don't work properly for the software you want. Even if you're comfortable rolling up your sleeves and jumping into the code, we can't guarantee that everything you try can be compiled.