Installing, Upgrading, and Uninstalling Macports

What is Macports?

  • Macports is a software repository that ports Linux open-source software to be compatible with Macs.
  • Examples of such software are gmt, nedit, ghostscript and gv.

Installing Macports on your Mac will allow you to have access to their repository and install ported Linux tools. You can also update any Macports software you installed via the appropriate port command.

Do I Need Macports?

  • Macports is installed on every managed machine at IGPP.
  • If you have a self-managed machine and need software like gmt, nedit, gv, etc. then you should follow this wiki.

Macports at IGPP

Below is a list of ports that are installed on every managed IGPP computer:

  • szip
  • gdal
  • gcc12
  • gmt6
  • gawk
  • Ghostscript
  • gv xorg-libXt
  • nedit
  • xpdf
  • rsync
  • sshfs
  • geographiclib
  • py311-pip
  • py311-obspy
  • py311-numpy
  • py311-scipy
  • py311-matplotlib
  • py311-future
  • netcdf
  • hdf5
  • openjpeg
  • graphicsmagick
  • ffmpeg
  • ncarg

A comprehensive list of available ports can be found at http://www.macports.org/

Prerequisite: Install Xcode Command Line Tools

  1. sudo xcode-select --install

Installing Macports

  1. Download and install Macports from http://www.macports.org/ .
  2. Sync your local software tree with the master repository using this command:

    sudo port -v selfupdate
  3. This installs all the ports used at IGPP:

    sudo port -N install szip gdal gcc12 gmt6 gawk ghostscript gv xorg-libXt nedit xpdf rsync sshfs geographiclib py311-pip py311-obspy py311-numpy py311-scipy py311-matplotlib py311-future netcdf hdf5 openjpeg graphicsmagick ffmpeg ncarg

Upgrading Macports

These commands would be done if you wanted to keep your installed ports updated to the latest version.

  1. sudo port selfupdate
  2. sudo port upgrade installed

Macports Cheat Sheet

Macports must be installed for the port command to work. 


port command

Function

sudo port selfupdate

Sync local tree with Macports repository. Do this before installing or upgrading ports.

sudo port install [port]

Install ports


sudo port upgrade installed

Upgrade installed ports

Uninstalling Macports

https://guide.macports.org/chunked/installing.macports.uninstalling.html

Resources

Official documentation can be found at http://www.macports.org/.


If you need further assistance, please contact IGPP Net Ops.