2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

brew doctor 実行後、Unexpected header files の削除を推奨された時の対処

Last updated at Posted at 2020-11-30

環境

  • macOS Big Sur バージョン11.0.1
  • Homebrew 2.5.12
  • nodebrew 1.0.1

問題となっている状況

$ brew doctor

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/node/js_native_api.h
  /usr/local/include/node/js_native_api_types.h
  /usr/local/include/node/libplatform/libplatform-export.h
  /usr/local/include/node/libplatform/libplatform.h
  /usr/local/include/node/libplatform/v8-tracing.h
  /usr/local/include/node/node.h
  /usr/local/include/node/node_api.h
  /usr/local/include/node/node_api_types.h
  /usr/local/include/node/node_buffer.h
  /usr/local/include/node/node_object_wrap.h
  /usr/local/include/node/node_version.h
  /usr/local/include/node/openssl/aes.h
  /usr/local/include/node/openssl/archs/BSD-x86/asm/crypto/buildinf.h
  /usr/local/include/node/openssl/archs/BSD-x86/asm/crypto/include/internal/bn_conf.h
  /usr/local/include/node/openssl/archs/BSD-x86/asm/crypto/include/internal/dso_conf.h
  /usr/local/include/node/openssl/archs/BSD-x86/asm/include/openssl/opensslconf.h

 .....予期しないヘッダーファイルの羅列.....

原因

  • homebrewを使わずにnode.jsを導入したため。
  • 具体的には、DockerでWordPress開発環境構築のためnode.jsをインストールしていたが、homebrewからnodebrewを導入しnodeの安定版をインストールした。

実行したこと

  • 問題となっているフォルダごと削除
  • パスワードを求められるので入力して実行
$ sudo rm -R /usr/local/include/node

brew doctor で確認

  • Unexpected header files が全てクリアになり解決しました。

参考

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?