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?

3 Answers 3


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

  • 2
    Thank you! That worked for me. Strangely, after that, Software Update updated the command-line tools yet again (to 12.2 and without breaking anything). Nov 30, 2020 at 21:18
  • Yes, it did the same to me, also.
    – vy32
    Dec 1, 2020 at 2:07
  • 1
    Excellent! Thanks! I watched /Library/Developer/CommandLineTools/SDKs/ while installation. Before installation, there was no MacOSX11.0.sdk/ and MacOS.sdk was a symlink to MacOSX10.15.sdk. After installation, MacOS.sdk links to the newly created MacOSX11.0.sdk.
    – chan1142
    Dec 9, 2020 at 13:20
  • 1
    Right after the installation from the apple developer site, MacOSX11.0.sdk is timestamped Oct 20 05:39. After Software Update, it is the time it is updated.
    – chan1142
    Dec 9, 2020 at 13:32
  • 1
    Thank you, I was thought have to wait for 2.6.5, but luckily see your answer.
    – Jianyu
    Mar 21, 2021 at 7:27

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.

  • Thanks. I did download the new MacPorts installer. I've been using MacPorts since 2007. I find that it's frequently easier to just do a rm -rf /opt/local and reinstall from scratch...
    – vy32
    Nov 24, 2020 at 18:27
  • @vy32: Yeah - sorry, I didn't see your answer when I started mine - got distracted & came back to it hours later. Glad to hear you got it working. MacPorts is fairly picky about the version of CLT. 2007 - you've been using it longer than I have :)
    – Seamus
    Nov 24, 2020 at 19:21
  • Things change so fast, being an old-timer is not necessarily an advantage. Also, I could remain a novice user for years and years by stubbornly refusing to read the documentation! Thanks for your help.
    – vy32
    Nov 25, 2020 at 1:49

This is how I solved it:

Everything is working again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .