macmini os version mismatch between gui and terminal

I have upgraded to Monterey in my Macmini



but from my terminal it picks

wdcdtgmobile-JSS1666:~ wdcdtgmobile$ sw_vers

ProductName: Mac OS X

ProductVersion: 10.16

BuildVersion: 21E258


so whenever i build something using xcode or so i get this error


Executable requires at least macOS 12.0, but is being run on macOS 10.16, and so is exiting.


Please help

Posted on May 5, 2022 12:42 AM

Reply
Question marked as Top-ranking reply

Posted on May 6, 2022 2:30 AM

I had the same problem recently and discovered that I had a flag enabled in my zsh config called:

export SYSTEM_VERSION_COMPAT=1

I fixed it by commenting out the above line and running the below in your terminal:

SYSTEM_VERSION_COMPAT=0

Similar questions

4 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

macmini os version mismatch between gui and terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.