2012-08-27 4 views
1

를 설치할 수 없습니다 내가 iconv 모듈을 설치하려고 노력하지만, 항상 숙박 : 나는 무슨 일이 있었 성공 또는 실패 모르는Node.js를이 :의 iconv 모듈을

^[email protected]: server$ npm install iconv 
npm http GET https://registry.npmjs.org/iconv 
npm http 304 https://registry.npmjs.org/iconv 

> [email protected] install /Users/yippeeyippee/Desktop/nodejs/tinman/server/node_modules/iconv 
> node-gyp rebuild 

gyp http GET http://nodejs.org/dist/v0.8.7/node-v0.8.7.tar.gz 
gyp http 200 http://nodejs.org/dist/v0.8.7/node-v0.8.7.tar.gz 

, 어떻게이 문제를 해결할 수 ?

는 업데이트 :

나는이 같은 실패 정보를 가지고 :, 오랜 시간을 기다린 후 :이 단계 노드 활력 설치 프로그램 다운로드에서

xcode-select: Error: No Xcode is selected. Use xcode-select -switch /Applications/Xcode.app to select /Applications/Xcode.app, or see the xcode-select manpage (man xcode-select) for further information. 

Traceback (most recent call last): 
    File "/Users/yippeeyippee/.node-gyp/0.8.7/tools/gyp/gyp", line 18, in <module> 
    sys.exit(gyp.main(sys.argv[1:])) 
    File "/Users/yippeeyippee/.node-gyp/0.8.7/tools/gyp/pylib/gyp/__init__.py", line 480, in main 
    generator.GenerateOutput(flat_list, targets, data, params) 
    File "/Users/yippeeyippee/.node-gyp/0.8.7/tools/gyp/pylib/gyp/generator/make.py", line 2082, in GenerateOutput 
    part_of_all=qualified_target in needed_targets) 
    File "/Users/yippeeyippee/.node-gyp/0.8.7/tools/gyp/pylib/gyp/generator/make.py", line 764, in Write 
    self.Pchify)) 
    File "/Users/yippeeyippee/.node-gyp/0.8.7/tools/gyp/pylib/gyp/generator/make.py", line 1137, in WriteSources 
    cflags = self.xcode_settings.GetCflags(configname) 
    File "/Users/yippeeyippee/.node-gyp/0.8.7/tools/gyp/pylib/gyp/xcode_emulation.py", line 259, in GetCflags 
    sdk_root = self._SdkPath() 
    File "/Users/yippeeyippee/.node-gyp/0.8.7/tools/gyp/pylib/gyp/xcode_emulation.py", line 248, in _SdkPath 
    return os.path.join(self._GetSdkBaseDir(), '%s.sdk' % sdk_root) 
    File "/Users/yippeeyippee/.node-gyp/0.8.7/tools/gyp/pylib/gyp/xcode_emulation.py", line 234, in _GetSdkBaseDir 
    raise Exception('Error %d running xcode-select' % job.returncode) 
Exception: Error 1 running xcode-select 
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:346:16) 
gyp ERR! stack  at ChildProcess.EventEmitter.emit (events.js:91:17) 
gyp ERR! stack  at Process._handle.onexit (child_process.js:674:10) 
gyp ERR! System Darwin 11.4.0 
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild" 
gyp ERR! cwd /Users/yippeeyippee/Desktop/nodejs/tinman/server/node_modules/iconv 
gyp ERR! node -v v0.8.7 
gyp ERR! node-gyp -v v0.6.8 
gyp ERR! not ok 
npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script. 
npm ERR! This is most likely a problem with the iconv 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 iconv 
npm ERR! There is likely additional logging output above. 

npm ERR! System Darwin 11.4.0 
npm ERR! command "node" "/usr/local/bin/npm" "install" "iconv" 
npm ERR! cwd /Users/yippeeyippee/Desktop/nodejs/tinman/server 
npm ERR! node -v v0.8.7 
npm ERR! npm -v 1.1.49 
npm ERR! code ELIFECYCLE 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /Users/yippeeyippee/Desktop/nodejs/tinman/server/npm-debug.log 
npm ERR! not ok code 0 
+0

것은 당신이 제대로 설치 했 노드 활력과 종속성을 다시 시도 후 sudo xcode-select --switch /Applications/Xcode.app 시도? https://github.com/TooTallNate/node-gyp – JohnnyHK

+0

@JohnnyHK : 이미 설치했습니다. v0.6.8 – hh54188

답변

14

명령 행 도구 만 (없음 엑스 코드) 방법

  1. 다운로드 및 맥 OS X 개발자에게 Command Line Tools
  2. 실행 sudo xcode-select --switch /usr/bin를 설치합니다. (나에 의해 테스트되지 않은)
    1. 다운로드하여 npm install iconv

    Xcode의 버전을 다시 시도 자세한

  3. 에 대한 homebrew issue 10245보기 및 전체 Xcode
  4. npm install iconv 다시 시도 설치합니다. 작동하면 완료됩니다. 같은 오류가 발생하는 경우
  5. , 당신의 npm install iconv
+2

"종료 : 종료 코드로 오류 :'gyp'가 실패하고"sudo xcode-select -switch/usr/bin "을 실행하면 작업이 완료되었습니다! 고맙습니다! – vinyll

+0

나를 위해 일했습니다. 감사! –

+0

감사합니다. 이 솔루션은 npm pg 패키지의 노드 - gyp 오류를 수정하는 것으로 보입니다 (postgres) – Kreegr

0

소스 코드를 Node.js를. 연결 속도에 따라 시간이 오래 걸릴 수 있습니다. 예를 들어, 중국에있는 매우 느린 연결로 서버에서이 단계에서 20 ~ 25 분 정도 기다리고 있습니다.

+0

아마도 문제가 아니며 이미 실패한 정보를 업데이트했습니다. – hh54188

+0

Mac OS를 사용 중입니까? 동일한 문제는 https://github.com/mxcl/homebrew/issues/10245에서 확인하십시오. "sudo xcode-select -switch /Applications/Xcode.app"를 실행하면 도움이 될 것입니다. 하지만 맥 오에스는이를 확인하지 못했다. –