【问题标题】:Command line install of topojson throwing fatal errortopojson的命令行安装抛出致命错误
【发布时间】:2013-10-24 20:36:26
【问题描述】:

我正在尝试在 OSX Maverick 上安装 topojson,但遇到了一个致命错误:fatal error: 'sys/types.h' file not found。我在下面包括导致终端错误的原因以及随后的所有内容。

我刚刚专门为此安装了 node.js - 所以我不确定问题与哪个包有关。

...
npm http 304 https://registry.npmjs.org/boom
npm http 304 https://registry.npmjs.org/hoek
npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5
  CXX(target) Release/obj.target/contextify/src/contextify.o
In file included from ../src/contextify.cc:1:
In file included from /Users/anekola/.node-gyp/0.10.21/src/node.h:61:
/Users/anekola/.node-gyp/0.10.21/deps/uv/include/uv.h:59:10: fatal error: 'sys/types.h' file not found
#include <sys/types.h> /* size_t */
         ^
1 error generated.
make: *** [Release/obj.target/contextify/src/contextify.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 13.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/contextify
gyp ERR! node -v v0.10.21
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0

我确实使用过 sudo:sudo npm install -g topojson。我绝不是命令行专家。

【问题讨论】:

  • 您是否安装了xcode并升级到最新版本,您是否安装了xcode的命令行工具?
  • xcode 可能是问题所在。我的办公室里有一些软件对小牛队反应不佳,所以事情搞砸了。现在更新 - 当我有结果时会更新。
  • 你解决了吗?我遇到了同样的错误

标签: node.js topojson


【解决方案1】:

Jeff 是对的 - 感谢 Jeff - 看来我只需要确保我的 xcode 已更新。实际上,我发现我更新到 Maverick 后需要重新安装 xcode。我没想到。

在此下载链接:https://developer.apple.com/xcode/

抱歉,tak3r - 以为我上周发布了这个!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-12-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-16
    • 2023-01-30
    相关资源
    最近更新 更多