7
5

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 5 years have passed since last update.

Homebrewで「Warning: Unbrewed header files were found in /usr/local/include. ・・・」とエラーが出た際の解消法

Posted at

Homebrewを使っている際、
アップデートやインストール問題のチェックを行うと出るエラーが出ることがあります。

1.環境

PC : mac
OS : macOS Mojava バージョン10.14.4
Homebrew : バージョン 2.1.6

2. エラーが出るコマンドの例

インストール問題のチェック

brew doctor

3. エラーの出力部分

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

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/fakemysql.h
 /usr/local/include/fakepq.h
 /usr/local/include/fakesql.h
 /usr/local/include/itcl.h
 /usr/local/include/itcl2TclOO.h
 /usr/local/include/itclDecls.h
 /usr/local/include/itclInt.h
  /usr/local/include/itclIntDecls.h
  /usr/local/include/itclMigrate2TclCore.h
  /usr/local/include/itclTclIntStubsFcn.h
 /usr/local/include/mysqlStubs.h
 /usr/local/include/odbcStubs.h
 /usr/local/include/pqStubs.h
 /usr/local/include/tcl.h
 /usr/local/include/tclDecls.h
 /usr/local/include/tclOO.h
 /usr/local/include/tclOODecls.h
 /usr/local/include/tclPlatDecls.h
 /usr/local/include/tclThread.h
 /usr/local/include/tclTomMath.h
 /usr/local/include/tclTomMathDecls.h
 /usr/local/include/tdbc.h
 /usr/local/include/tdbcDecls.h
 /usr/local/include/tdbcInt.h
 /usr/local/include/tk.h
 /usr/local/include/tkDecls.h
 /usr/local/include/tkPlatDecls.h

4. 解決策

1. ターミナルを開く
2. 以下のコマンドを実行
フォルダを移動するコマンドです。

cd ~/../../usr/local/include/

3. 以下のコマンドを実行
そのフォルダでファインダーを開くコマンドです。

open .

4. エラーの出力のなかに書いてあるファイルをすべて削除してください。

僕の場合、以下の

 /usr/local/include/fakemysql.h
 /usr/local/include/fakepq.h
 /usr/local/include/fakesql.h
 /usr/local/include/itcl.h
 /usr/local/include/itcl2TclOO.h
 /usr/local/include/itclDecls.h
 /usr/local/include/itclInt.h
  /usr/local/include/itclIntDecls.h
  /usr/local/include/itclMigrate2TclCore.h
  /usr/local/include/itclTclIntStubsFcn.h
 /usr/local/include/mysqlStubs.h
 /usr/local/include/odbcStubs.h
 /usr/local/include/pqStubs.h
 /usr/local/include/tcl.h
 /usr/local/include/tclDecls.h
 /usr/local/include/tclOO.h
 /usr/local/include/tclOODecls.h
 /usr/local/include/tclPlatDecls.h
 /usr/local/include/tclThread.h
 /usr/local/include/tclTomMath.h
 /usr/local/include/tclTomMathDecls.h
 /usr/local/include/tdbc.h
 /usr/local/include/tdbcDecls.h
 /usr/local/include/tdbcInt.h
 /usr/local/include/tk.h
 /usr/local/include/tkDecls.h
 /usr/local/include/tkPlatDecls.h

のファイルをすべて削除しました。
※ エラーの出ていないファイル・フォルダがある可能性もあるので注意してください。

以上で解決で私は解決出来ました。

5. 参考文献

一馬力のメモ帳 | Homebrewの問題を確認する"brew doctor"コマンドとWarning対策集[macOS]

7
5
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
7
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?