2

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 ?

1 Answer 1

0

The official Macports migration instructions are here https://trac.macports.org/wiki/Migration

They suggest installing the new Macports version before running the port -qv installed command - thus you should not get that error.

Personally I run the port -qv installed command whilst still on the old macOPS and then do the OS and macports reinstallation

You must log in to answer this question.