2013-12-21 4 views
1

노드 npm (sudo 사용)을 통해 Mavericks에 topojson을 설치할 수 없습니다. Xcode 명령 줄 도구가 설치되어 있고 다양한 솔루션을 시도했지만 운이 없었습니다. 여기 내 결과입니다 :노드 npm을 사용하여 OSX Mavericks에 topojson 설치

> [email protected] install /usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/contextify 
> node-gyp rebuild 

    CXX(target) Release/obj.target/contextify/src/contextify.o 
cc1plus: error: unrecognized command line option "-arch" 
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.24 
gyp ERR! node-gyp -v v0.12.1 
gyp ERR! not ok 
    .... 
    npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script. 
npm ERR! This is most likely a problem with the contextify package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node-gyp rebuild 
npm ERR! You can get their info via: 
npm ERR!  npm owner ls contextify 
npm ERR! There is likely additional logging output above. 
    .... 
npm ERR! System Darwin 13.0.0 
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "topojson" 
npm ERR! cwd /Users/mattmosier 
npm ERR! node -v v0.10.24 
npm ERR! npm -v 1.3.21 
npm ERR! code ELIFECYCLE 
    .... 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /Users/mattmosier/npm-debug.log 
npm ERR! not ok code 0 

아이디어가 있으십니까?

답변

1

두 가지 문제점을 발견했습니다.

1) 내 gcc 컴파일러 버전이 오래되었습니다. 나는 4.9를 사용할 수있는 최신 4.5 때 사용했다. 나는 이것을 (Homebrew와 함께) 업데이트했고 나는 분명히있을 것이라고 생각했다. 아니.

2) 나는 which gcc으로 달렸고, Macports로로드 된 이전 버전을 여전히 가리키는 것을 발견했습니다. 따라서 최신 버전의 gcc도 Xcode 명령 행 도구도 사용되지 않았습니다 (Macports는 대신 /opt/local/bin에 모든 것을 버렸습니다). 내 $PATH에서 /opt/local/bin/opt/local/sbin을 제거하여 문제를 해결했습니다. 그 후 sudo npm install -g topojson이 효과가있었습니다.

+0

고마워요. 비슷한 문제가 생겼습니다. gcc를 업데이트하면 문제가 해결됩니다. – kjones

관련 문제