In short: reinsall everything which has been compiled in or linked against libraries the old system.
- Upgrade OS
- Install or Upgrade XCode
- Start XCode to perform some final steps
- Clean CLI Tools:
rm -rf /Library/Develper/CommandLineTools
- Reinstall CLI Tools:
xcode-select --install
The process is described in detail here: https://trac.macports.org/wiki/Migration. This will probably take very long and you will likely reinstall many oudated and unused packackes.
An alternative ist to clean erverything and reinstall only required packes.
port installed active > ports.txt
; alternativelyport installed requested and active > ports.txt
gives a more concise list but requested and "in use" are not the same in my experience- Uninstall all of MacPorts https://guide.macports.org/chunked/installing.macports.uninstalling.html
- Install MacPorts for the new Mac OS version.
- Reinstall desired ports maually by picking the contents of
ports.txt
Some packages like Postgresql e.g. require further manual setup steps.
MacPorts modifies ~/.bash_profile
to prepend its paths to the PATH variable. Before that ~/.bash_profile
sources ~/.bashrc
; so all PATH changes triggered from ~/.bashrc
will have a lower precedence than the ones from MacPorts.
I decided to load MacPorts paths from ~/.basrc
and to remove the modifications in ~/.bash_profile
. Hoever, it seems that ervery (re)install of MacPorts does modify ~/.bash_profile
and messes up the PATH again!