Install MacPorts on macOS Ventura

MacPorts is another way to install applications in macOS. It was designed for macOS users that want to install software using a simpler, easy to use for compiling, installing and updating open source applications. If you ever try Linux such as Ubuntu, you will be familiar with sudo apt get install command. MacPorts works similar to that command. We can use command line to install and update applications in macOS environment. There are many programs that can be installed using MacPorts. We have tested that this program works on Apple Silicon Mac. I am using MacBook Pro M1.

Before we can use MacPort to install programs, we need to install MacPorts on our macOS system first. To do this, we need to do the following:

  • Install XCode and XCode Command Line Tools
  • Instlal MacPorts

Step 1. Install XCode and XCode Command Line Tools

You can install XCode from Apple Store. Open Apple Store and search for XCode

Or, open Terminal and use this command

xcode-select --install

Step 2. Install MacPorts

After we installed the dependency files above, we can now install MacPorts. Download the latest version of MacPorts from the below link. Select the package based on your macOS version

How to Install Package with Mac Ports

Installing package or software using Mac Ports is pretty easy. For example, I will install phpmyadmin

sudo port phpmyadmin

Search for package

Use the search command to find a port that we want to install

sudo port search phpmyadmin


dhani@dhanis-Virtual-Machine ~ % sudo port search phpmyadmin
phpmyadmin @5.2.0 (www, php, databases)
    A tool written in PHP intended to handle the administration of MySQL over
    the Web.
dhani@dhanis-Virtual-Machine ~ % 

Uninstall Port

To remove or uninstall the program, use the remove command

sudo port uninstall phpmyadmin

Get Help

To access the Help menu, simply use this command

sudo port help

For a complete information about Mac Ports commands, please visit the official page

Be the first to comment

Leave a Reply