User's Guide - 3. Installing Packages
Now that you have something that can be called a Fink installation, this chapter shows you how to install the actual software packages you came for. Before we explain how to install packages using either the source or the binary distribution, some important notes that apply to both.
3.1 Installing Binary Packages with dselect
dselect
is a program that lets you browse the list of
available packages and select which ones you want installed.
It runs inside Terminal.app, but takes over the whole "screen" and
uses simple keyboard navigation.
Like the other package management tools, dselect
requires
root privileges, so you should use sudo (from an account with administrator privileges):
sudo dselect
Note:
dselect
has known difficulties with the Mac OS X Terminal application. You should run the following commands before using it, or put them in the appropriate startup file (e.g. .cshrc
/ .profile
):
bash users:
export TERM=xterm-color
tcsh users:
setenv TERM xterm-color
The main menu has several choices:
-
[A]ccess - this configures the network access method to use. You do not need to run this, since Fink pre-configures everything for you. Actually, you should avoid this menu item as it may overwrite the default configuration with one that doesn't work.
-
[U]pdate - this item downloads the list of available packages from the Fink site. This item does not install or update any actual packages, it just updates the listings used for the package browser. You must run this at least once after installing Fink.
-
[S]elect - this gives you the actual package listing, where you can select and deselect the packages you want on your system. More about this later.
-
[I]nstall - this is where the action is. The menu items above only affect dselect's package listings and status database. This one actually goes out and downloads and installs the packages you have requested. It also removes the packages you have deselected in the browser.
-
[C]onfig and [R]emove - these are relics from the time before apt. You do not need them, although they won't do harm.
-
[Q]uit - now that should really be obvious.
You'll spend most of your time with dselect in the package browser, reachable through the "[S]elect" menu item. Before dselect shows you the package list, it presents you with an introductory help screen. You can press 'k' to get a full listing of keyboard commands, or just Space to get to the package list.
You can move through the list using the up and down keys. Selections are made with '+' and '-'. When you select a package that needs some other packages, dselect will show you a sublist with the affected packages. In most cases you can just press Return to accept dselect's choices. You can also make adjustments in the sublist (e.g. to choose another alternative for a virtual package dependency), or press 'R' (i.e. Shift-R) to return to the previous state. Both the sublists and the main package list are left by pressing Return. When you're happy with your selections, leave the main list and use the "[I]nstall" menu item to actually install the packages.
3.2 Installing Binary Packages with apt-get
dselect
doesn't actually download the packages itself.
Instead, it runs apt to do the dirty work.
If you prefer a pure command line interface, you can access the
functions of apt directly, with the apt-get
command.
Like with dselect, you must first download the current listing of available packages with this command:
sudo apt-get update
Like the "[U]pdate" menu item in dselect, this doesn't update the actual files on your computer, just apt's list of available packages. To install a package, you just give apt-get the name, like this:
sudo apt-get install lynx
If apt-get determines that the packages requires other packages to be installed, it will show you the list and ask for confirmation. It then downloads and installs the requested packages. Removing packages is just as easy:
sudo apt-get remove lynx
3.3 Installing Dependent Packages that are Unavailable in the Binary Distribution
Sometimes, when doing a binary install, you may get messages that a dependency can't be installed. e.g.:
Sorry, but the following packages have unmet dependencies: foo: Depends: bar (>= version) but it is not installable E: Sorry, broken packages
What has happened is that the package you are trying to install depends on another package that can't be distributed as a binary, due to licensing requirements. You must install the dependency from source (see the next section).
3.4 Installing Binary and Source Packages with fink
The fink
tool will allow you to install packages that are not yet
available in the binary
distribution.
First of all, you'll need an appropriate version of the Developer Tools for your system. The latest version is available for free download after registration at http://connect.apple.com.
To get a list of packages that are available for installation from
source, ask the fink
tool:
fink list
The first column lists the installation state (blank for not
installed, i
for installed, (i)
for
installed but not the latest version), followed by the package name,
the latest version, and a short description.
You can ask for more information about a specific package using the
"describe" command ("info" is an alias for this):
fink describe xmms
When you have found a package that you want to install, use the "install" command:
fink install wget-ssl
The fink
command will first check if all necessary
prerequisites ("dependencies") are present, and will ask you if it's
okay to install them if some are missing.
Then it goes ahead and downloads source code, unpacks it, patches it,
compiles it, and installs the results on your system.
This can take a long time.
If you run into errors during that process, please first check the
FAQ.
You can tell fink
to try to download
pre-compiled binary packages, if available, instead of building them. Just pass
the --use-binary-dist (or -b)
option to fink
. This can save you a lot of time. E.g.
calling
fink --use-binary-dist install wget-ssl
or
fink -b install wget-ssl
will first download all dependencies for wget-ssl that are available from the
binary distribution and only build the remainder from source. This option can
also be enabled permanently in the Fink configuration
file (fink.conf) or by running the command fink configure
.
More details about the fink
tool are available in the chapter
"Using the fink Tool from the Command Line".
3.5 Fink Commander
Fink Commander is an Aqua interface to both apt-get
and the fink
tool. The Binary menu lets you do operations on the binary distribution, and the Source menu does the same thing for the source distribution.
Fink Commander is included with the Fink binary installer. To download it separately (e.g. if you've bootstrapped Fink from source), or for additional information, visit the Fink Commander website.
3.6 Available versions
When you want to install a package, you should first check the package database and see if it is available at all through Fink. The available version(s) of the package will be shown in several rows of a table. These are:
- Binary Distribution
0.8.1: This is the base version that can be installed from binaries for OS 10.4. If you update Fink, later versions of some packages may be available.
0.9.0: This is the base version that can be installed from binaries for OS 10.5. If you update Fink, later versions of some packages may be available.
- CVS/rsync Distributions
10.4/powerpc stable: This is the most recent version that can be installed from the stable source tree for OS 10.4 users on PowerPC hardware.
10.4/intel stable: This is the most recent version that can be installed from the stable source tree for OS 10.4 users on intel hardware.
10.4/powerpc unstable: This is the most recent version that can be installed from the unstable source tree for OS 10.4 users on PowerPC hardware.
10.4/intel unstable: This is the most recent version that can be installed from the unstable source tree for OS 10.4 users on intel hardware.
Note: unstable doesn't necessarily mean unusable, but install such packages at your own risk.
10.5/powerpc stable: This is the most recent version that can be installed from the stable source tree for OS 10.5 users on PowerPC hardware.
10.5/intel stable: This is the most recent version that can be installed from the stable source tree for OS 10.5 users on intel hardware.
10.5/powerpc unstable: This is the most recent version that can be installed from the unstable source tree for OS 10.5 users on PowerPC hardware.
10.5/intel unstable: This is the most recent version that can be installed from the unstable source tree for OS 10.5 users on intel hardware.
3.7 Getting X11 Sorted Out
Many of the packages that are available via Fink require the installation of some form of X11. Because of this, one of the first things that is typically done is to choose an X11 implementation.
Since there are several X11 implementations available for Mac OS X (Apple's X11, XFree86, X.org) and several ways to install them (manually or via Fink), there are several alternative packages - one for each setup. Here is a list of the available X11 packages and installation methods:
-
xfree86, xfree86-shlibs: Install both of these packages for XFree86-4.5.0 (OS 10.4 only).
xorg, xorg-shlibs (OS 10.4 only ) Install these packages to get the 6.8.2 release of the X.org X11 distribution.
-
system-xfree86 + -shlibs, -dev: These packages are automatically generated if you install Apple's X11, or manually installed XFree86 or X.org. They will then act as dependency placeholders.
For more information on installing and running X11, refer to the X11 on Darwin and Mac OS X document.
Next: 4. Upgrading Fink