The Fink Project is a mechanism for obtaining, installing, and keeping up-to-date a wide variety of open source applications on your Macintosh. The project itself is made up of volunteers who are dedicated to bringing the best open source software to Mac OS X. They fine-tune these open source applications for the Mac OS X environment, and then keep the applications updated so they work with the latest release of Mac OS X.
Many of the programs featured in this chapter are available through Fink, as is a wealth of other applications. To install Fink, do the following:
To begin using Fink, you need to set up your PATH and some environment variables . Fortunately, Fink provides a shell script to help with this. Add this command to the end of your .profile file (see Section 4.3.2 in Chapter 4):
Next, close your Terminal window and open a new one. You won't notice anything different, but the addition to your .profile will configure future Terminal sessions for Fink. After you've installed Fink and started a new Terminal session, you can use the apt-get utility to install packages. When you issue the apt-get command, you must use sudo (see Section 3.3 in Chapter 3) so you can make changes to the system.
After you've done a fresh install of Fink, your first step should always be to update the list of available packages with apt-get update (you can also run this command every couple of weeks to see whether any new packages have been released, perhaps by adding it to the cron monthly file):
$ sudo apt-get update Password: ******** Get:1 http://us.dl.sourceforge.net release/main Packages [112kB] Get:2 http://us.dl.sourceforge.net release/main Release [85B] Get:3 http://us.dl.sourceforge.net release/crypto Packages [9247B] Get:4 http://us.dl.sourceforge.net release/crypto Release [87B] Get:5 http://us.dl.sourceforge.net current/main Packages [112kB] Get:6 http://us.dl.sourceforge.net current/main Release [85B] Get:7 http://us.dl.sourceforge.net current/crypto Packages [9247B] Get:8 http://us.dl.sourceforge.net current/crypto Release [87B] Fetched 243kB in 1s (207kB/s) Reading Package Lists... Done Building Dependency Tree... Done
9.2.1 Listing Available Packages
To see a list of available packages, use the command fink list (this sample shows an abbreviated list):
$ fink list more Information about 1710 packages read in 1 seconds. 3dpong 0.4-2 Pong clone a2ps 4.12-4 Any to PostScript filter i aalib 1.4rc5-2 Ascii art library i aalib-bin 1.4rc5-2 Ascii art library i aalib-shlibs 1.4rc5-2 Ascii art library abiword 1.0.2-2 Open-source word processor [... output deleted for brevity...]
An i in the leftmost column indicates that the package is already installed. The second column is the package name . The third column shows the version number, and the last column provides a brief description of the package.
9.2.2 Installing Packages
You can use the apt-get install command to install a package, such as Lynx, a text-only web browser:
$ sudo apt-get install lynx Reading Package Lists... Done Building Dependency Tree... Done The following NEW packages will be installed: lynx 0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 1319kB of archives. After unpacking 0B will be used. Get:1 http://us.dl.sourceforge.net release/main lynx 2.8.4-1 [1319kB] Fetched 1319kB in 11s (120kB/s) Selecting previously deselected package lynx. (Reading database ... 3450 files and directories currently installed.) Unpacking lynx (from .../lynx_2.8.4-1_darwin-powerpc.deb) ... Setting up lynx (2.8.4-1) ...
When you use apt-get to install a package, Fink searches the Fink archive web site for a pre-built package provided by the volunteer team. A pre-built package is an application that has been bundled up in a manner similar to the installers used by other Mac OS X applications. Although the fink list command will list many packages, not all of them have binary packages. However, if you've installed the Mac OS X Xcode Tools, you can use the fink install command to automatically download, compile, and install an application. For example, as of this writing, there was no binary package for the command-line email program Pine. Here's how you'd install it using fink install :
$ fink install pine sudo /sw/bin/fink install pine Password: ******** Information about 1710 packages read in 3 seconds. pkg pine version ### pkg pine version 4.44-2 The following package will be installed or updated: pine [... output deleted for brevity...]
The fink install command performs a lot of actions on your behalf : downloading source code, locating patches (modifications to the source code that provide Mac OS X compatibility), compiling the source, and installing the compiled programs. This process can take a long time, depending on which packages you have selected. If you select a package that depends on another package, fink will automatically install them both. If there are many dependencies between packages, you could be in for a long wait.
For this reason, it's best to use apt-get to install packages whenever possible. Since apt-get uses precompiled packages, you don't have to download all the source and wait for compilation. Also, apt-get warns you if there are any dependencies, and gives you a chance to cancel the installation prior to adding software you're not sure about:
$ sudo apt-get install ethereal Password: ******** Reading Package Lists... Done Building Dependency Tree... Done The following extra packages will be installed: dlcompat glib glib-shlibs gtk+ gtk+-data gtk+-shlibs libpcap libpcap-shlibs system-xfree86 zlib The following NEW packages will be installed: dlcompat ethereal glib glib-shlibs gtk+ gtk+-data gtk+-shlibs libpcap libpcap-shlibs system-xfree86 zlib 0 packages upgraded, 11 newly installed, 0 to remove and 0 not upgraded. Need to get 13.7MB of archives. After unpacking 0B will be used. Do you want to continue? [Y/n]