brewでnodeをインストールしようとしたらエラーが発生しました。
$ brew doctor
で確認すると以下のようなWarningが表示されたので、解決した方法を備忘録として残しておきます。
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
/usr/local/include/node/openssl/archs/BSD-x86/asm/include/progs.h
/usr/local/include/node/openssl/archs/BSD-x86/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/BSD-x86/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/BSD-x86/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/BSD-x86/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/BSD-x86/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/BSD-x86/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/BSD-x86/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/BSD-x86/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/BSD-x86/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/BSD-x86/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm/include/progs.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/BSD-x86_64/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm/include/progs.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/VC-WIN32/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/VC-WIN32/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/VC-WIN32/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/VC-WIN32/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN32/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/VC-WIN64-ARM/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/VC-WIN64-ARM/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/VC-WIN64-ARM/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/VC-WIN64-ARM/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN64-ARM/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm/include/progs.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/VC-WIN64A/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/aix-gcc/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/aix-gcc/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/aix-gcc/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/aix-gcc/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/aix-gcc/asm/include/progs.h
/usr/local/include/node/openssl/archs/aix-gcc/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/aix-gcc/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/aix-gcc/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/aix-gcc/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/aix-gcc/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/aix-gcc/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/aix-gcc/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/aix-gcc/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/aix-gcc/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/aix-gcc/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm/include/progs.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/aix64-gcc/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/aix64-gcc/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/aix64-gcc/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/aix64-gcc/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/aix64-gcc/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm/include/progs.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm/include/progs.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux-aarch64/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-aarch64/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-aarch64/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-aarch64/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-aarch64/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-armv4/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-armv4/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-armv4/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-armv4/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-armv4/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-armv4/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-armv4/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-armv4/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-armv4/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-armv4/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux-armv4/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-armv4/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-armv4/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-armv4/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-armv4/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-elf/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-elf/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-elf/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-elf/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-elf/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-elf/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-elf/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-elf/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-elf/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-elf/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux-elf/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-elf/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-elf/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-elf/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-elf/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-ppc/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-ppc/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-ppc/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-ppc/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-ppc/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-ppc/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-ppc/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-ppc/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux-ppc/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-ppc/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-ppc/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-ppc/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux-ppc64/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-ppc64/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc64/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux-ppc64le/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-x32/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-x32/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-x32/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-x32/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-x32/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-x32/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-x32/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-x32/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-x32/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-x32/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux-x32/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-x32/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-x32/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-x32/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-x32/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux-x86_64/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-x86_64/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-x86_64/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-x86_64/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-x86_64/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux32-s390x/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux32-s390x/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux32-s390x/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux32-s390x/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux32-s390x/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux64-mips64/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux64-mips64/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux64-mips64/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux64-mips64/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux64-mips64/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux64-s390x/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux64-s390x/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux64-s390x/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux64-s390x/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux64-s390x/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm/include/progs.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm/include/progs.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/include/progs.h
/usr/local/include/node/openssl/asn1.h
/usr/local/include/node/openssl/asn1_mac.h
/usr/local/include/node/openssl/asn1err.h
/usr/local/include/node/openssl/asn1t.h
/usr/local/include/node/openssl/async.h
/usr/local/include/node/openssl/asyncerr.h
/usr/local/include/node/openssl/bio.h
/usr/local/include/node/openssl/bioerr.h
/usr/local/include/node/openssl/blowfish.h
/usr/local/include/node/openssl/bn.h
/usr/local/include/node/openssl/bn_conf.h
/usr/local/include/node/openssl/bn_conf_asm.h
/usr/local/include/node/openssl/bn_conf_no-asm.h
/usr/local/include/node/openssl/bnerr.h
/usr/local/include/node/openssl/buffer.h
/usr/local/include/node/openssl/buffererr.h
/usr/local/include/node/openssl/camellia.h
/usr/local/include/node/openssl/cast.h
/usr/local/include/node/openssl/cmac.h
/usr/local/include/node/openssl/cms.h
/usr/local/include/node/openssl/cmserr.h
/usr/local/include/node/openssl/comp.h
/usr/local/include/node/openssl/comperr.h
/usr/local/include/node/openssl/conf.h
/usr/local/include/node/openssl/conf_api.h
/usr/local/include/node/openssl/conferr.h
/usr/local/include/node/openssl/crypto.h
/usr/local/include/node/openssl/cryptoerr.h
/usr/local/include/node/openssl/ct.h
/usr/local/include/node/openssl/cterr.h
/usr/local/include/node/openssl/des.h
/usr/local/include/node/openssl/dh.h
/usr/local/include/node/openssl/dherr.h
/usr/local/include/node/openssl/dsa.h
/usr/local/include/node/openssl/dsaerr.h
/usr/local/include/node/openssl/dso_conf.h
/usr/local/include/node/openssl/dso_conf_asm.h
/usr/local/include/node/openssl/dso_conf_no-asm.h
/usr/local/include/node/openssl/dtls1.h
/usr/local/include/node/openssl/e_os2.h
/usr/local/include/node/openssl/ebcdic.h
/usr/local/include/node/openssl/ec.h
/usr/local/include/node/openssl/ecdh.h
/usr/local/include/node/openssl/ecdsa.h
/usr/local/include/node/openssl/ecerr.h
/usr/local/include/node/openssl/engine.h
/usr/local/include/node/openssl/engineerr.h
/usr/local/include/node/openssl/err.h
/usr/local/include/node/openssl/evp.h
/usr/local/include/node/openssl/evperr.h
/usr/local/include/node/openssl/hmac.h
/usr/local/include/node/openssl/idea.h
/usr/local/include/node/openssl/kdf.h
/usr/local/include/node/openssl/kdferr.h
/usr/local/include/node/openssl/lhash.h
/usr/local/include/node/openssl/md2.h
/usr/local/include/node/openssl/md4.h
/usr/local/include/node/openssl/md5.h
/usr/local/include/node/openssl/mdc2.h
/usr/local/include/node/openssl/modes.h
/usr/local/include/node/openssl/obj_mac.h
/usr/local/include/node/openssl/objects.h
/usr/local/include/node/openssl/objectserr.h
/usr/local/include/node/openssl/ocsp.h
/usr/local/include/node/openssl/ocsperr.h
/usr/local/include/node/openssl/opensslconf.h
/usr/local/include/node/openssl/opensslconf_asm.h
/usr/local/include/node/openssl/opensslconf_no-asm.h
/usr/local/include/node/openssl/opensslv.h
/usr/local/include/node/openssl/ossl_typ.h
/usr/local/include/node/openssl/pem.h
/usr/local/include/node/openssl/pem2.h
/usr/local/include/node/openssl/pemerr.h
/usr/local/include/node/openssl/pkcs12.h
/usr/local/include/node/openssl/pkcs12err.h
/usr/local/include/node/openssl/pkcs7.h
/usr/local/include/node/openssl/pkcs7err.h
/usr/local/include/node/openssl/rand.h
/usr/local/include/node/openssl/rand_drbg.h
/usr/local/include/node/openssl/randerr.h
/usr/local/include/node/openssl/rc2.h
/usr/local/include/node/openssl/rc4.h
/usr/local/include/node/openssl/rc5.h
/usr/local/include/node/openssl/ripemd.h
/usr/local/include/node/openssl/rsa.h
/usr/local/include/node/openssl/rsaerr.h
/usr/local/include/node/openssl/safestack.h
/usr/local/include/node/openssl/seed.h
/usr/local/include/node/openssl/sha.h
/usr/local/include/node/openssl/srp.h
/usr/local/include/node/openssl/srtp.h
/usr/local/include/node/openssl/ssl.h
/usr/local/include/node/openssl/ssl2.h
/usr/local/include/node/openssl/ssl3.h
/usr/local/include/node/openssl/sslerr.h
/usr/local/include/node/openssl/stack.h
/usr/local/include/node/openssl/store.h
/usr/local/include/node/openssl/storeerr.h
/usr/local/include/node/openssl/symhacks.h
/usr/local/include/node/openssl/tls1.h
/usr/local/include/node/openssl/ts.h
/usr/local/include/node/openssl/tserr.h
/usr/local/include/node/openssl/txt_db.h
/usr/local/include/node/openssl/ui.h
/usr/local/include/node/openssl/uierr.h
/usr/local/include/node/openssl/whrlpool.h
/usr/local/include/node/openssl/x509.h
/usr/local/include/node/openssl/x509_vfy.h
/usr/local/include/node/openssl/x509err.h
/usr/local/include/node/openssl/x509v3.h
/usr/local/include/node/openssl/x509v3err.h
/usr/local/include/node/uv.h
/usr/local/include/node/uv/aix.h
/usr/local/include/node/uv/android-ifaddrs.h
/usr/local/include/node/uv/bsd.h
/usr/local/include/node/uv/darwin.h
/usr/local/include/node/uv/errno.h
/usr/local/include/node/uv/linux.h
/usr/local/include/node/uv/os390.h
/usr/local/include/node/uv/posix.h
/usr/local/include/node/uv/stdint-msvc2008.h
/usr/local/include/node/uv/sunos.h
/usr/local/include/node/uv/threadpool.h
/usr/local/include/node/uv/tree.h
/usr/local/include/node/uv/unix.h
/usr/local/include/node/uv/version.h
/usr/local/include/node/uv/win.h
/usr/local/include/node/v8-internal.h
/usr/local/include/node/v8-platform.h
/usr/local/include/node/v8-profiler.h
/usr/local/include/node/v8-testing.h
/usr/local/include/node/v8-util.h
/usr/local/include/node/v8-value-serializer-version.h
/usr/local/include/node/v8-version-string.h
/usr/local/include/node/v8-version.h
/usr/local/include/node/v8-wasm-trap-handler-posix.h
/usr/local/include/node/v8-wasm-trap-handler-win.h
/usr/local/include/node/v8.h
/usr/local/include/node/v8config.h
/usr/local/include/node/zconf.h
/usr/local/include/node/zlib.h
Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
node
解決方法
Warning: Unbrewed header files were found in /usr/local/include.
まずは以下のWarningを解決した方法を書きます。
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/v8.h
/usr/local/include/node/v8config.h
/usr/local/include/node/zconf.h
/usr/local/include/node/zlib.h
このWarningに書いてあることは、
/usr/local/includeというファイルあるけど、意図的においている訳ではないなら削除して
みたいな感じなので書かれた通りにファイルを削除していきます。
ターミナルに以下を入力して、vimでファイル作成、vimのテキストエディタを開きます。
$ vim ~/.del_files.sh
vimのテキストエディタが開けたらiを入力してINSERTモードに変更します。
1行目に#!/bin/bash
を入力し、2行目以降にUnexpected dylibs:
以下にあるファイルをコピペして、esc
を押して、ノーマルモードに変更します。
#!/bin/bash
/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/v8.h
/usr/local/include/node/v8config.h
/usr/local/include/node/zconf.h
/usr/local/include/node/zlib.h
カーソルを#!/bin/bash
の下にあるファイルの先頭に置いて、control + v
でビジュアルモード(VISUAL BLOCK)に変更し、一番下のファイルまで移動して:
を押します。
そうすると下に:'<,'>
が入力された状態でコマンドラインが表示されるので、続けてs/^/rm -f /
と入力します。
Enter
を押して、全てのファイルの先頭にrm -f
と追加されているのを確認したら、:
を押して、一番下の入力欄にwq!
と入力してEnter
を押します。
#!/bin/bash
rm -f /usr/local/include/node/js_native_api.h
rm -f /usr/local/include/node/js_native_api_types.h
rm -f /usr/local/include/node/libplatform/libplatform-export.h
rm -f /usr/local/include/node/libplatform/libplatform.h
.
.
.
.
rm -f /usr/local/include/node/v8.h
rm -f /usr/local/include/node/v8config.h
rm -f /usr/local/include/node/zconf.h
rm -f /usr/local/include/node/zlib.h
そうすると通常のターミナルに戻るので、
$ bash ~/.del_files.sh
を実行するとファイルが削除できるはずだったのですが、
$ bash ~/.del_files.sh
rm: /usr/local/include/node/js_native_api.h : Permission denied
rm: /usr/local/include/node/js_native_api_types.h: Permission denied
rm: /usr/local/include/node/libplatform/libplatform-export.h: Permission denied
rm: /usr/local/include/node/libplatform/libplatform.h: Permission denied
.
.
.
.
rm: /usr/local/include/node/v8.h: Permission denied
rm: /usr/local/include/node/v8config.h: Permission denied
rm: /usr/local/include/node/zconf.h: Permission denied
rm: /usr/local/include/node/zlib.h: Permission denied
のように表示されて削除ができませんでした。
ファイルの後ろに: Permission denied
と書かれているので、権限を付与するかsudo
コマンドで実行することが必要と判断して、sudo
コマンドの実行をするためにもう一度vim ~/.del_files.sh
を開いてsudo
コマンドを追加します。
まず、vim ~/.del_files.sh
をターミナルに入力してvimのテキストエディタを開きます。
その後、ファイルの先頭にカーソルを合わせて、control + v
でビジュアルモード(VISUAL BLOCK)に変更して、一番下のファイルまで移動して、:
を押します。
先ほどと同様に下に:'<,'>
が表示されるので、今度はs/^/sudo /
と入力して、Enter
を押します。
ファイルの先頭にsudo
と追加できていたら:
を押して、コマンドラインにwq!
と入力してEnter
を押します。
#!/bin/bash
sudo rm -f /usr/local/include/node/js_native_api.h
sudo rm -f /usr/local/include/node/js_native_api_types.h
sudo rm -f /usr/local/include/node/libplatform/libplatform-export.h
sudo rm -f /usr/local/include/node/libplatform/libplatform.h
.
.
.
.
sudo rm -f /usr/local/include/node/v8.h
sudo rm -f /usr/local/include/node/v8config.h
sudo rm -f /usr/local/include/node/zconf.h
sudo rm -f /usr/local/include/node/zlib.h
通常のターミナルに戻ってきたら以下のコマンドを実行します。
$ bash ~/.del_files.sh
これでWarningの一つが解決しました。
Warning: You have unlinked kegs in your Cellar.
次にこのWarningを解決した方法を書きます。
Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
node
とりあえず読んでみるとbrew link
してくださいということが書かれているみたいですが、今回は一回リセットしてnode
をインストールしたいと思っているので、リンク先のディレクトリを削除していきます。
$ brew unlink node
Unlinking /usr/local/Cellar/node/14.5.0... 0 symlinks removed
次に表示されているディレクトリを削除します。
$ rm -drf /usr/local/Cellar/node/
Warningを解決したのでbrew doctor
で確認します。
$ brew doctor
Warning: Broken symlinks were found. Remove them with `brew cleanup`:
/usr/local/opt/node
/usr/local/opt/node@14
brew cleaup
をしてくださいというWarningが表示されたので実行します。
$ brew cleanup
実行した後、brew doctor
で確認します。
$ brew doctor
your system is ready to brew.
これで全てのWarningを解決することができました。
参考にしたサイト
https://qiita.com/ponsuke0531/items/80f716c803ac23c7849d
https://qiita.com/6592sho/items/b24766e203fb7a48b056
https://qiita.com/rinimaruranran/items/2d8d930ad846fa41b9e6