簡體   English   中英

Brew安裝節點--without-npm失敗

[英]Brew install node --without-npm fails

John Papa關於“如何在OSX上使用沒有sudo的npm全局”的帖子之后,我正在運行

brew install node --without-npm

我收到此信息/錯誤:

/usr/local > brew install node --without-npm
==> Downloading https://nodejs.org/dist/v5.10.1/node-v5.10.1.tar.xz
Already downloaded: /Library/Caches/Homebrew/node-5.10.1.tar.xz
==> Downloading https://ssl.icu-project.org/files/icu4c/56.1/icu4c-56_1-src.tgz
Already downloaded: /Library/Caches/Homebrew/node--icu4c-56.1.tgz
==> ./configure --prefix=/usr/local/Cellar/node/5.10.1 --without-npm --with-intl
==> make install
Last 15 lines from /Users/justin/Library/Logs/Homebrew/node/02.make:
#include <limits>
         ^
In file included from ../deps/gtest/src/gtest-death-test.cc:34:
In file included from ../deps/gtest/include/gtest/gtest-death-test.h:41:
In file included from ../deps/gtest/include/gtest/internal/gtest-death-test-internal.h:40:
In file included from ../deps/gtest/include/gtest/internal/gtest-internal.h:40:
../deps/gtest/include/gtest/internal/gtest-port.h:259:10: fatal error: 'ctype.h' file not found
#include <ctype.h>   // for isspace, etc
         ^
1 error generated.
make[1]: *** [/private/tmp/node20160410-11435-157r8bn/node-v5.10.1/out/Release/obj.target/gtest/deps/gtest/src/gtest-filepath.o] Error 1
make[1]: *** Waiting for unfinished jobs....
1 error generated.
make[1]: *** [/private/tmp/node20160410-11435-157r8bn/node-v5.10.1/out/Release/obj.target/gtest/deps/gtest/src/gtest-death-test.o] Error 1
make: *** [node] Error 2

按照Homebrew的故障排除說明 ,我兩次運行brew updatebrew doctor - 但仍然沒有運氣。 我不熟悉自制軟件,並且在一段時間內沒有弄亂這些東西。 任何想法這些錯誤是什么意思?

您似乎沒有安裝命令行開發人員工具。 在使用Homebrew安裝Node之前,請嘗試在終端中執行此命令:

xcode-select --install

如果安裝成功,將顯示以下消息:

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

安裝完成后,再次運行brew命令。

ctype.h文件應該在/usr/include/ctype.h地方。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM