I have just upgraded my macBook pro 16" from Big Sur to Monterey.
The issue is that I have tried to save all the macports that I had previously on Big Sur but I get an error :
$ sudo port -qv installed > myports.txt
Error: Current platform "darwin 21" does not match expected platform "darwin 20"
Error: If you upgraded your OS, please follow the migration instructions: https://trac.macports.org/wiki/Migration
Error: /opt/local/bin/port: Failed to initialize MacPorts, OS platform mismatch
port selfupdate
Error: Current platform "darwin 21" does not match expected platform "darwin 20"
Error: If you upgraded your OS, please follow the migration instructions: https://trac.macports.org/wiki/Migration
OS platform mismatch
while executing
"mportinit ui_options global_options global_variations"
Error: /opt/local/bin/port: Failed to initialize MacPorts, OS platform mismatch
I would like to install the new version of macport
for Monterey but I don't know how to save all the /opt/local/* packages of previous macOS Big Sur macports.
Could anyone see a fix to keep all my macports packages with Monterey OS ?