When a MacPorts build or install fails

Occasionally an install from MacPorts fails, 9 times out of 10 it’ll be a dependency failing to build. And 9 times out of 10, a clean+selfupdate+resintall does the trick…

sudo port clean portfile
sudo port selfupdate
sudo port install portfile [+variants]

Failing that, a port upgrade usually helps…

sudo port upgrade outdated