I've been using MacPorts for several years to provide several command line packages that I also use on Linux systems. But often times when I go to use these, I encounter a couple of issues. Here's how I'm currently resolving these two issues.

I often can't find the MacPorts package in my path

My solution: Update the default PATH environmental variable on my mac.

sudo vi /etc/paths

The MacPorts packages currently installed are out of date

My solution: Setup a CRON for root to upgrade and clean my MacPorts install. 

sudo crontab -e

# UPDATE MAC PORTS - https://guide.macports.org/chunked/using.common-tasks.html
15 10 * * 2,5 ( /opt/local/bin/port selfupdate; /opt/local/bin/port upgrade outdated; /opt/local/bin/port uninstall inactive; /opt/local/bin/port uninstall leaves; /opt/local/bin/port uninstall obsolete )
  • No labels