I have a mac which I purchased having Mavericks installed and now upgradedEl Capitan. I had installed MacPorts earlier and now I want to uninstall, but I am getting this error.
> sudo port -fp uninstall installed
Error: Current platform "darwin 15" does not match expected platform "darwin 13"
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
The uninstallation instruction on the migration page of macports also leads to the same error. It would be great if anyone can explain the error.
MacPorts Guide Chapter 2.4. Uninstall:
To remove all remaining traces of MacPorts, run the following command in the Terminal. [...]
sudo rm -rf \ /opt/local \ /Applications/DarwinPorts \ /Applications/MacPorts \ /Library/LaunchDaemons/org.macports.* \ /Library/Receipts/DarwinPorts*.pkg \ /Library/Receipts/MacPorts*.pkg \ /Library/StartupItems/DarwinPortsStartup \ /Library/Tcl/darwinports1.0 \ /Library/Tcl/macports1.0 \ ~/.macports
EDIT: Oh, to explain the error. Your previous MacPorts installation was for a previous version of OSX, corresponding to 'platform "darwin 13"', but you are now running a newer version of OSX corresponding to 'platform "darwin 15"'.