How to Install Open-Source Software with MacPorts

Installing open-source software on a Mac can be intimidating. You might be asked to install a bunch of weird-sounding software packages.

Bring up Terminal on your Mac

Bring up Terminal on your Mac. All of these commands to be done using Terminal.

Proceed with Caution

You can seriously mess up your Mac if you do not know what you are doing in Terminal.

Terminal is for advanced users only. Terminal assumes you are an expert and does not do the “Does the user know what they are doing?” checks the GUI does.

Terminal assumes you are an expert. It will simply not question you, and will obey.

This a very powerful feature, but is a two-edged sword if Terminal is used carelessly.

Install MacPorts

MacPorts simplifies the task of compiling and installing open-source software on a Mac.

In this blog, we are going to use MacPorts to install HTTrack on a Mac.

Go to the MacPorts home page.

MacPorts Go to macports_org
MacPorts Home Page

Click on the Download button.

MacPorts Click on Download Button

Now you are at the Installing MacPorts page. In the Quickstart section, click on the link for your Mac OSX. As of this writing, for Monterey, it is “macOS Monterey v12“.

MacPorts Click on link for your Mac OSX

The MacPorts installer will be downloaded to the Downloads folder.

MacPorts Installer downloaded to Downloads Folder
MacPorts Installer in Downloads Folder

Open the MacPorts package and install MacPorts.

Open MacPorts Installer

Simply click on the default buttons as shown below to install MacPorts.

MacPorts Installer Click Continue
MacPorts Installer Click Agree
MacPorts Installer Click Install

When asked, enter the password to authorize the installation. Enter the password you used to log into your Mac. Then click the Install Software button.

MacPorts Installer Enter Password Click Install Software

MacPorts will install. This might take a few minutes.

MacPorts Installer Preparing for Installation
MacPorts Installer Preparing the Disk
MacPorts Installer Preparing MacPorts
MacPorts Installer Waiting for other installations to complete
MacPorts Installer Configuring the Installation
MacPorts Installer Validating packages
MacPorts Installer Writing Files
MacPorts Installer Registering package with system
MacPorts Installer Moving items into place
MacPorts Installer Running package scripts

The installation was successful! Click the Close button.

MacPorts Installer Click Close

Since you can get the MacPorts Installer from the MacPorts website, you likely do not need it. Click the Move to Trash button.

MacPorts Installer Click Move to Trash

The MacPorts installation is done!

How to Install Open-Source Software with MacPorts

Go to the ports page for MacPorts.

MacPorts Ports Page

Or go to the MacPorts home page and click on the Available Ports tab.

MacPorts Click Available Ports Tab

Either method will get you to the ports page.

I recommend bookmarking the port page. It allows you to search for ports, see the most popular ports. You can see All Ports. You can even click a button and install MacPorts from this page.

Clicking on the Ports link in the navigation bar will take you to an alphabetized list of all the ports.

MacPorts Click Ports Link

Here is an alphabetized list of all the ports.

I am going to show you how to install HTTrack using MacPorts.

In the Search bar, enter the port you want, then click the Search button. In this example, we are searching for httrack.

MacPorts Search for Port

The search results are shown. Click on the one that you want. In this example, we click on the httrack link.

MacPorts Click on hHtrack Port

This takes you to MacPorts httrack page.

Note that it says you will be using Terminal to install the port.

Click on the Copy button to copy the command into the clipboard.

MacPorts Click Copy

Open up Terminal and paste the command into it.

MacPorts Paste into Terminal

Press the Enter key to execute the command.

MacPorts Text is Pasted into Terminal

You may be asked to enter a password. Enter the password you use to log into your Mac. Press the Enter key.

Nothing will be displayed as you enter the password. This is normal, and is a very good security feature!

MacPorts Enter Password

The port will be installed. When the normal Terminal prompt is displayed, you will know the port is installed.

MacPorts HTTrack is Installed

MacPorts may find some dependencies are needed. It will list these dependencies and will ask you if you want to continue.

Type a capital Y and press the enter key.

Httrack Dependencies

The installation will finish. It might take several minutes, so be patient.

Resources

Manual

Mac Ports Guide

Scroll to Top