Can't upgrade macports under Big Sur!
I just upgraded to big Sur and the macports upgrade instructions don't work.
I keep getting this error:
Warning: The macOS 11.0 SDK does not appear to be installed. Ports may not build correctly.
Warning: You can install it as part of the Xcode Command Line Tools package by running `xcode-select --install'.
But I do have Xcode Command Line Tools installed:
% xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
%
What's up?
Solution 1:
It turns out that the Big Sur's XCode command-line tools aren't good enough for MacPorts. You need to manually download Command Line Tools for Xcode 12.2 from https://developer.apple.com/download/more/?=command%20line%20tools
Solution 2:
MacPorts typically uses different installers for different versions of macOS. Have you installed the MacPorts for Big Sur, or are you trying to upgrade MacPorts with a port
command?
Have you seen this notice re updating MacPorts?:
% sudo port selfupdate
I don't run/haven't installed Big Sur, but I've used MacPorts for a while. MacPorts often issues a similar puzzling error after Catalina upgrades - it's puzzling until you learn what causes it. A symptom similar to the one you describe occurred after in-version and/or Xcode upgrades on Catalina (e.g. 10.15.5 to 10.15.6). The explanation, and the fix, are described here.
Hopefully, one of these will get you back on track.