When I run brew doctor
, the following error is thrown
Warning: Unbrewed header files were found in /usr/local/include.
If you didn\'t put them t
It looks like you installed curl and nodejs without using homebrew.
You have two options:
I recommend #2 because it is likely, in the future you will install something from homebrew which depends on curl and/or node and homebrew will attempt to install those dependencies. When building from source, wrong headers may get used and mismatch libraries being linked. This is not fun to debug.
If those non homebrew header files are there for a reason and you are compiling software with them, then you are probably able to put them back if you need them. If you aren't building software with them, then you don't need them. Go ahead and delete them for now.
You can skip the stray header checks to make it easier to see if there are issues other than node/npm not playing nicely with homebrew
brew doctor `brew doctor --list-checks | grep -v stray_headers`
This solution worked for me!
sbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
It may be safe to leave those files in place unless you encounter build or link problems with other Homebrew formulas; brew doctor
output is advisory, not normative.
If you don't think you have a reason to build against the versions of curl or node in /usr/local, you can remove those header files; you can always reinstall the newest version later with Homebrew.