9.2 Fink


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:

  1. Download the Fink binary installer disk image (a .dmg file) from http://fink. sourceforge .net/download.

  2. If your web browser doesn't automatically open the disk image, switch to the Finder and double-click the .dmg file to mount the disk image.

  3. Open the mounted disk image and double-click the Fink Installer .pkg package inside.

  4. Follow the instructions on the screen.

You can also find an installer for many open source applications by selecting the "Get Mac OS X Software . . . " menu from the Apple menu, which opens a web browser and takes you to the Apple web site. From there, find and click on the "Unix & Open Source" link, which offers a list of useful Unix applications. The advantage of using Fink is that it will manage thousands of available packages, making sure that you have the latest versions and that different packages cooperate with each other.


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):

 . /sw/bin/init.sh 

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) ... 

The web site http://finkcommander.sourceforge.net/ is home to FinkCommander, a free graphical user interface for Fink. Use this program if you'd rather have a GUI interface to maintain your Fink installation.


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] 


Learning Unix for Mac OS X Panther
Learning Unix for Mac OS X Panther
ISBN: 0596006179
EAN: 2147483647
Year: 2003
Pages: 88

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net