2016-06-22 11 views
0

를 설치 NPM 실패. 그러나 그 명령은 내가 인터넷에 대한 검색그래서 나는 내가 파이썬의 두 가지 버전이 있기 때문에 내가 <code>--python=python2.7</code> 옵션을 사용 <blockquote> <p>npm install nanomsg --python=python2.7</p> </blockquote> <p></p>을 나는 리눅스 머신에 <code>nanomsg</code>를 설치하려고 nanomsg

make: Entering directory `/qt_home/{my_username}/node_modules/nanomsg/build' 
    CC(target) Release/obj.target/nanomsg/deps/nanomsg/src/aio/ctx.o 
cc1: error: unrecognized command line option "-Wno-maybe-uninitialized" 
make: *** [Release/obj.target/nanomsg/deps/nanomsg/src/aio/ctx.o] Error 1 
make: Leaving directory `/qt_home/{my_username}/node_modules/nanomsg/build' 
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2 
gyp ERR! stack  at ChildProcess.onExit (/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23) 
gyp ERR! stack  at emitTwo (events.js:106:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:191:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12) 
gyp ERR! System Linux 2.6.18-409.el5 
gyp ERR! command "/usr/local/bin/node" "/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /qt_home/{my_username}/node_modules/nanomsg 
gyp ERR! node -v v6.2.2 
gyp ERR! node-gyp -v v3.0.3 
gyp ERR! not ok 
npm ERR! Linux 2.6.18-409.el5 
npm ERR! argv "/bin/node" "/bin/npm" "install" "nanomsg" "--python=python2.7" 
npm ERR! node v4.2.1 
npm ERR! npm v2.14.7 
npm ERR! code ELIFECYCLE 

npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. 
npm ERR! This is most likely a problem with the nanomsg 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 nanomsg 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /qt_home/{my_username}/npm-debug.log 

오류 메시지가 이런 종류의 실패,하지만 도움이 아무것도 찾을 수 없습니다. 나는 지금까지 this link을 찾았다. 그러나 그것은 나를 도와주지 않았다.

node js 버전은 6.2.2이고 npm 버전은 2.14.7입니다.

의견이나 제안이 있으십니까?

답변

0

설치를 위해 sudo를 사용해 보셨습니까? 때로는 특정 부품에 필요합니다.

sudo npm install nanomsg --python=python2.7 

또한 파이썬 너무 익숙하지 메신저하지만 당신은 당신의 컴파일러를 지원 doesnot 대신 python2.7

sudo npm install nanomsg --python=/usr/bin/python2.7 
+0

예, 필자는'sudo'와 python2.7의 직접 경로를 시도했지만 결과는 같습니다. – nabroyan

0

cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"

가 표시 오류 메시지의 직접 경로를 추가 할 수 있습니다 옵션 -Wno-maybe-uninitialized.

나노 라이브러리를 빌드하는 데 사용되는 컴파일러 옵션은 linux.gypi에 정의되어 있습니다. 컴파일러를 따라 구축하기 위해 nanomsg 구성을 사용하려면

'cflags': [ 
'-O3', '-Wall', '-Wextra', '-Wno-sign-compare', '-Wno-strict-aliasing', 
'-Wno-unused', '-Wno-char-subscripts', '-Wno-maybe-uninitialized', 
'-Wno-implicit-function-declaration', '-lpthread', 
], 

, 당신은 다음과 같이 진행 수 :

git clone https://github.com/nanomsg/nanomsg 
cd nanomsg 
./configure 
cmake . 
make 
sudo make install 
sudo cp /usr/local/lib/pkgconfig/naming.pc /usr/local/lib/pkgconfig/libnaming.pc 

다음 당신은 실행할 수 있습니다 :

npm install nanomsg --use_system_libnanomsg=true