2014-06-15 37 views
15

Sistemimde yüklemek için Bağlam alamıyorum. Ubuntu 14.04, node.js sürüm 0.10.25, npm sürüm 1.3.10 node-gyp sürüm 0.10.10Bağlam yükleme başarısız - "düğüm: bulunamadı"

çalıştırıyorum. Yükseltme, yeniden başlatma, önce bağımlılıkları yükleme, her şeyi denedim. Hiçbir şey işe yaramaz.

~$ sudo npm install -g contextify 
npm http GET https://registry.npmjs.org/contextify 
npm http 304 https://registry.npmjs.org/contextify 
npm http GET https://registry.npmjs.org/bindings 
npm http GET https://registry.npmjs.org/nan 
npm http 304 https://registry.npmjs.org/bindings 
npm http 304 https://registry.npmjs.org/nan 

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

/bin/sh: 1: node: not found 
gyp: Call to 'node -e "require('nan')"' returned exit status 127. while trying to load binding.gyp 
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16) 
gyp ERR! stack  at ChildProcess.EventEmitter.emit (events.js:98:17) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:797:12) 
gyp ERR! System Linux 3.13.0-29-generic 
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild" 
gyp ERR! cwd /usr/local/lib/node_modules/contextify 
gyp ERR! node -v v0.10.25 
gyp ERR! node-gyp -v v0.10.10 
gyp ERR! not ok 
npm WARN This failure might be due to the use of legacy binary "node" 
npm WARN For further explanations, please read 
/usr/share/doc/nodejs/README.Debian 

npm ERR! weird error 1 
npm ERR! not ok code 0 

cevap

40

Aynı sorun vardı. Görünüşe göre Debian, node komutunu nodejs olarak yeniden adlandırıyor ve bu da soruna neden oluyor. Benim için nodejs-legacy yükleme sorunu düzeltildi.

sudo apt-get update && sudo apt-get install nodejs-legacy 

Ayrıntılar için https://github.com/voodootikigod/node-serialport/issues/301 adresine bakın.

+4

Ya da sadece nodejs nodejs – PitaJ

+0

için simetriyelleştirme Bugün bu meseleye yeni girdik ve root kullanarak kurulum komutunu çalıştıran kullanıcı ile ilgili olarak yapmak zorunda kaldık. Yukarıdaki örnekte, '** sudo ** npm install -g contextify' çalıştırıyorsunuz. Normal kullanıcı 'npm install -g contextify' olarak çalıştırmayı deneyin. – slickplaid

İlgili konular