Hello,
Apple is not installing the headers by default with XCode since Mojave.
This causes ruby binary gems and some of the binary nodejs modules to fail installation.
The fix is simple so I don’t mind it, however, I think including this installation in the base OSX VM images would save a lot of time for people running into this issue.
This single command should install the missing library headers:
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
PS I ran into this issue when executing brew bottle
on osx11 env - the command failed while trying to compile some necessary gems (it auto installs its own deps on first run apparently).