Get MacPorts

MacPorts version is available in binary form as a dmg disk image for -10.4.dmg"> Tiger (Universal) or -10.3.dmg"> Panther, both containing a pkg installer, or version in source form as either a .tar.bz2">tar.bz2 package or a .tar.gz">tar.gz one. Checksums for all these are contained in the .chk.txt"> checksums file.

To get a files listing of all our available downloads checkout the downloads section of the site.

Please note that in order to install and run MacPorts on Mac OS X you must have Apple's Developer Tools package installed, found at the Apple Developer site or on your Mac OS X installation CDs/DVD.

If you want to use MacPorts on a platform other than Mac OS X, please be aware of the following requirements (we assume that you have basics such as gcc):

Mac OS X Package (.pkg) Installer

The easiest way to install MacPorts on a Mac OS X system is by downloading the -10.4.dmg">dmg for Tiger or the -10.3.dmg">one for Panther and running Installer.app on the pkg contained therein by double clicking on them, following the on-screen instructions until completion. This procedure will place a fully functional and default MacPorts installation on your host system, ready for usage. If needed, your shell configuration files will be adapted by the installer to include the necessary settings to run MacPorts. You may need to open a new shell for these changes to take effect.

Although not strictly necessary, it is still recommended that you synchronize your recent installation with our rsync server to ensure you have the latest release available of the MacPorts infrastructure and of the “Portfiles” containing the instructions employed in the building and installation of ports. To accomplish this simply execute:

sudo port -d selfupdate

It is also recommended to run the above command on a regular basis to keep your installation always current. At this point you should be ready to enjoy MacPorts!

Source Installation

If on the other hand you decide to install from source, there are still a couple of things you will need to do once you've downloaded the tarball before you can install a port with the MacPorts system, namely compiling and installing MacPorts itself. “cd” into the directory where you downloaded the package and run “tar xjvf .tar.bz2"> MacPorts-.tar.bz2” or “tar xzvf .tar.gz">MacPorts-.tar.gz”, depending on whether you downloaded the bz2 tarball or the gz one, respectively. This will unpack the MacPorts sources that you will proceed to build and install. To do so, execute the following:

cd MacPorts-

./configure && make && sudo make install

Optionally:

cd ../
rm -rf MacPorts-*

These steps need to be perfomed from an administrator account, for which “sudo” will ask the password upon installation. This procedure will install a pristine MacPorts system and, if the optional steps are taken, remove the as of now unnecessary MacPorts- source directory and corresponding tarball. To customize your installation you should read the output of “./configure --help | more” and pass the appropriate options for the settings you wish to tweak to the configuration script in the steps detailed above.

You will need to adapt your shell's configuration files to find the binaries installed by MacPorts. Lastly, you need to synchronize your recent installation with the MacPorts rsync server:

sudo port -d selfupdate

Upon completion MacPorts will be ready to install ports. Again, it is recommended to run the above command on a regular basis to keep your installation current.

Help

Help is also available should you need it.

SVN Sources

If you are developer or a user with a taste for the bleeding edge and wish for the latest changes and feature additions, you may acquire the MacPorts sources through SVN.

Use the following command to check the project out of the MacPorts anonymous subversion repository:

svn co http://svn.macports.org/repository/macports/trunk

If you do not want to bother with fetching from SVN, you can download a nightly updated SVN-snapshot. Once extracted, you can keep it up to date with the usual “svn update” commands.

If you'd simply like to view the SVN repository without checking it out, you can do so via the Trac browser.