2016-06-22 6 views
0

я пытаюсь установить nanomsg на Linux машине, так что я делатьне удается установить НПМ nanomsg

npm install nanomsg --python=python2.7

Я использую --python=python2.7 вариант, потому что у меня есть две разные версии питона. Однако эта команда не может с такого рода сообщения об ошибке

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 

им также не слишком хорошо знакомы с Python, но вы можете добавить прямой путь вместо 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.

Опция компилятора, используемая для построения libramirie nanomsg, определена в linux.gypi.

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

Для того, чтобы использовать nanomsg Configure, чтобы построить его в соответствии ваш компилятор, вы можете продолжить так:

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 
Смежные вопросы