3

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ました。私は決してコマンドラインの専門家ではありません。

4

1 に答える 1

1

ジェフは正しかった - ジェフに感謝 - xcode が更新されていることを確認する必要があったようです。実際、Maverick にアップデートした後、xcode を再インストールする必要があることがわかりました。私はそれを期待していませんでした。

ここからリンクをダウンロードしてください: https://developer.apple.com/xcode/

すみません、tak3r - これは先週投稿したと思っていました!

于 2013-10-29T02:08:09.893 に答える