Do you want access to thousands of Linux/Unix programs on the Mac? Know what APT-GET is?
Basically MacPorts is APT-GET for the Mac.

After downloading the installer for Leopard – MacPorts-1.6.0-10.5-Leopard.dmg

From the installer screen:


What is MacPorts?

MacPorts provides an infrastructure for building, installing, and packaging open source software. It is designed to match the functionality of the FreeBSD Ports system and to be extensible for future enhancements.

System Requirements:

This disk image contains a Universal installer for Mac OS X 10.5.x and requires valid TCL, curl and OpenSSL installations to function – all present by default on Mac OS X. Also required is the installation of Apple’s Xcode programing suite, available as a separate installation from your OS X CDs or DVD, or preferably the latest version from Apple’s Developer site:

Install Location:

The MacPorts installer copies MacPorts to the target directory /opt/local. If you wish to install to any path other than that, you must install MacPorts via its source code. See Installing MacPorts on the MacPorts webpage for instructions on installation alternatives.

What is Installed:

Aside from a few MacPorts executable commands in /opt/local/bin, most MacPorts files are installed in /opt/local/var/macports. Within these directories you will find a “sources” directory containing the Portfiles that hold the necessary instructions to install individual ports, and also the source code for MacPorts itself. Both are kept up to date by using the port selfupdate command as shown below. Please read the port(1) man page for more information.

Shell Environment:

A file named ~/.profile is created for the “bash” shell (default on Mac OS X 10.3 and newer) during the MacPorts installation. It contains the necessary statements to append MacPorts’ binary paths within /opt/local/ to your shell environment, so MacPorts is available to you on subsequent terminal sessions. You may have to quit and restart your terminal application for this change to take effect.

Basic Usage:

The main user interface to MacPorts is the port command and the various facilities it provides for installing ports. The first thing you should do after you install MacPorts is to make sure it is fully up to date by pulling the latest revisions to the Portfiles and any updated MacPorts base code from our rsync server, all accomplished simply by running the port selfupdate command as the Unix superuser:

sudo port selfupdate

Running this command on a regular basis is recommended — it ensures your MacPorts installation is always up to date. Afterwards, you may search for ports to install:

port search <portname>

where <portname> is the name of the port you are searching for, or a partial name. To install a port you’ve chosen, you need to run the port install command as the Unix superuser:

sudo port install <portname>

where now <portname> maps to an exact port name in the ports tree, such as those returned by the port search command. Please consult the port(1) man page for complete documentation for this command and the software installation process.


The MacPorts Wiki is available at: and should be consulted for further documentation and support. Also provided are man pages for port, macports.conf, portfile, portgroup, portstyle, and porthier. These can be invoked by typing: “man” followed by the name of the command or file (e.g. “man port” or “man macports.conf”).

Executing the sudo port -v selfupdate command we get:

[admin@dev.local] Wed Apr 02 ~
[1] 00:07:36–> sudo port -v selfupdate


Synchronizing local ports tree from rsync://

receiving file list … done


sent 74 bytes received 299830 bytes 4443.02 bytes/sec

total size is 17762218 speedup is 59.23


MacPorts base version 1.600 installed

receiving file list … done


sent 73 bytes received 6462 bytes 104.56 bytes/sec

total size is 3962384 speedup is 606.33


Downloaded MacPorts base version 1.600


The MacPorts installation is not outdated and so was not updated

selfupdate done!


The base system is uptodate. Now to install my favorite unix uitility, a Norton Commander clone



[1] 00:11:55–> port info mc

mc 4.6.0, Revision 1, sysutils/mc (Variants: universal)


GNU Midnight Commander is a user-friendly yet powerful file manager and visual shell, useful to novice and guru alike. It provides a clear, user-friendly, and somewhat protected interface to a Unix system while making many frequent file operations more efficient and preserving the full power of the command prompt. After some practice, you will wonder how you could ever live without it.


Build Dependencies: pkgconfig

Library Dependencies: glib2

Platforms: darwin



It is installed by the following command



[3] 00:11:42–> sudo port install mc

—> Fetching expat

—> Attempting to fetch expat-2.0.1.tar.gz from

—> Verifying checksum(s) for expat

—> Extracting expat

—> Configuring expat

—> Building expat with target all

—> Staging expat into destroot

—> Installing expat 2.0.1_0

—> Activating expat 2.0.1_0

—> Cleaning expat

—> Fetching libiconv

—> Attempting to fetch libiconv-1.12.tar.gz from

—> Verifying checksum(s) for libiconv

—> Extracting libiconv

—> Applying patches to libiconv

—> Configuring libiconv

—> Building libiconv with target all

—> Staging libiconv into destroot

—> Installing libiconv 1.12_0

—> Activating libiconv 1.12_0

—> Cleaning libiconv

—> Fetching ncursesw

—> Attempting to fetch ncurses-5.6.tar.gz from

—> Verifying checksum(s) for ncursesw

—> Extracting ncursesw

—> Applying patches to ncursesw

—> Configuring ncursesw

—> Building ncursesw with target all

—> Staging ncursesw into destroot

—> Installing ncursesw 5.6_1

—> Activating ncursesw 5.6_1

—> Cleaning ncursesw

—> Fetching ncurses

—> Verifying checksum(s) for ncurses

—> Extracting ncurses

—> Applying patches to ncurses

—> Configuring ncurses

—> Building ncurses with target all

—> Staging ncurses into destroot

—> Installing ncurses 5.6_0

—> Activating ncurses 5.6_0

—> Cleaning ncurses

—> Fetching gettext

—> Attempting to fetch gettext-0.17.tar.gz from

—> Verifying checksum(s) for gettext

—> Extracting gettext

—> Applying patches to gettext

—> Configuring gettext

—> Building gettext with target all

—> Staging gettext into destroot

—> Installing gettext 0.17_3

—> Activating gettext 0.17_3

—> Cleaning gettext

—> Fetching pkgconfig

—> Attempting to fetch pkg-config-0.23.tar.gz from

—> Verifying checksum(s) for pkgconfig

—> Extracting pkgconfig

—> Configuring pkgconfig

—> Building pkgconfig with target all

—> Staging pkgconfig into destroot

—> Installing pkgconfig 0.23_0

—> Activating pkgconfig 0.23_0

—> Cleaning pkgconfig

—> Fetching glib2

—> Attempting to fetch glib-2.16.1.tar.bz2 from

—> Attempting to fetch glib-2.16.1.tar.bz2 from

—> Verifying checksum(s) for glib2

—> Extracting glib2

—> Applying patches to glib2

—> Configuring glib2

—> Building glib2 with target all

—> Staging glib2 into destroot

—> Installing glib2 2.16.1_0+darwin_9

—> Activating glib2 2.16.1_0+darwin_9

—> Cleaning glib2

—> Fetching mc

—> Attempting to fetch mc-4.6.0.tar.gz from

—> Verifying checksum(s) for mc

—> Extracting mc

—> Configuring mc

—> Building mc with target all

—> Staging mc into destroot

—> Installing mc 4.6.0_1

—> Activating mc 4.6.0_1

—> Cleaning mc

— more to come later —