Brew doctor - "warning: undisclosed header files were found in / usr / local / include"?

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 there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted. Unexpected header files: /usr/local/include/curl/curl.h /usr/local/include/curl/curlbuild.h /usr/local/include/curl/curlrules.h /usr/local/include/curl/curlver.h /usr/local/include/curl/easy.h /usr/local/include/curl/mprintf.h /usr/local/include/curl/multi.h /usr/local/include/curl/stdcheaders.h /usr/local/include/curl/typecheck-gcc.h /usr/local/include/node/ares.h /usr/local/include/node/ares_version.h /usr/local/include/node/nameser.h /usr/local/include/node/node.h /usr/local/include/node/node_buffer.h /usr/local/include/node/node_internals.h /usr/local/include/node/node_object_wrap.h /usr/local/include/node/node_version.h /usr/local/include/node/openssl/opensslconf.h /usr/local/include/node/uv-private/ngx-queue.h /usr/local/include/node/uv-private/stdint-msvc2008.h /usr/local/include/node/uv-private/tree.h /usr/local/include/node/uv-private/uv-bsd.h /usr/local/include/node/uv-private/uv-darwin.h /usr/local/include/node/uv-private/uv-linux.h /usr/local/include/node/uv-private/uv-sunos.h /usr/local/include/node/uv-private/uv-unix.h /usr/local/include/node/uv-private/uv-win.h /usr/local/include/node/uv.h /usr/local/include/node/v8-debug.h /usr/local/include/node/v8-preparser.h /usr/local/include/node/v8-profiler.h /usr/local/include/node/v8-testing.h /usr/local/include/node/v8.h /usr/local/include/node/v8stdint.h /usr/local/include/node/zconf.h /usr/local/include/node/zlib.h 

Can these files be deleted? What is the best way to resolve this warning?

+42
homebrew
Oct 16 '14 at 2:05
source share
5 answers

It looks like you installed curl and nodejs without using homebrew.

You have two options:

  • Do nothing but remember this forever, so that you do not think that they are from a homegrown, and are wondering why the homegrown complains.
  • Remove them and install nodejs and spin with homebrew.

1 is an easy way until it is.

I recommend # 2 because, most likely, in the future you will install something from homebrew, which depends on curl and / or node, and a homegrown will try to install these dependencies. When building from source code, invalid headers can be used and link mismatch libraries. It is not interesting to debug.

If the non-home headers are for some reason, and you compile the software with them, you can probably return them if you need them. If you do not create software with them, you do not need them. Go ahead and delete them now.

+42
Oct 17 '14 at 13:34
source share

It may be safe to leave these files in place if you do not encounter build problems or links with other Homebrew formulas; The brew doctor exit is advisory, not normative.

If you donโ€™t think you have a reason to build against curl or node versions in / usr / local, you can delete these header files; You can always reinstall the new version later using Homebrew.

+2
Oct 17 '14 at 6:09
source share

You can skip stray header checks to make it easier to see if there are issues other than node / npm that don't play well with homebrew

 brew doctor `brew doctor --list-checks | grep -v stray_headers` 
+2
Jun 23 '16 at 13:33
source share

I had the same problem, and this is the response of the administrator posted on the official Homebrew repository on github: โ€œOk to ignore this if you have no problems installing software with Homebrew. Brew doctor is a debugging tool for us, to help debug if you have problems. "

Link: https://github.com/Homebrew/homebrew/issues/32655

-one
Feb 09 '15 at 1:47
source share

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.* 
-3
Apr 24 '15 at 1:06
source share



All Articles