Installing MacPorts on Mac OS X 10.5 Leopard
In this post, I’ll be installing MacPorts to Mac OS X Leopard on my PowerMac G5.
MacPorts depends on Xcode to function. I’ve written a post on downloading and installing Xcode for older versions of Mac OS X. You can take a look here.
MacPorts is a utility for installing some Linux software to Mac OS in a convenient, compiled binary state. The first step, of course, is to point your web browser to the MacPorts install page at https://www.macports.org/install.php. I think Leopard qualifies as an older OS in 2019, so click on that link for “Older OS see here”...
...you’ll see there is an installer package available for Leopard. Click on the “Leopard” link to download it.
Go ahead and save the file to your hard drive.
In Finder, navigate to the folder where you downloaded the file. It’s a disk image, so double click to mount it.
Mounting the image opens it’s contents in Finder, in this case the “MacPorts-2.6.2.pkg” file. Double click this file to begin the installation.
The installer will guide you through the process. Follow the onscreen prompts. The first few steps involve the usual introductions and license agreement. Pretty standard stuff. Once you reach this window, click install to, well, install the software. After a couple minutes...
Once you’ve installed MacPorts, it’s a good idea to update the port tree. The port tree is the list of software packages MacPorts can install for you. Keeping your port tree current ensures that you’re always getting the latest version of a program MacPorts has available, so it’s a good idea to do this from time to time. Anyway, MacPorts is a conaole (text-based) application, so fire up Terminal. At the command prompt, run “sudo port selfupdate”. You’ll be prompted for your password, the same password you use to log into your account on the computer. Enter this, and MacPorts will check for updates to the port tree, as well as the MacPorts software itself. It doesn’t really display much in the way of anything to show progress, but it will let you know when it’s done. You may also want to run the command as “sudo port self update --no-sync” sometimes.. This checks for updates to the MacPorts software without updating the port tree. Anyway, MacPorts is now installed and ready for use. But that’s for another time...