Closed iliailia1212 closed 9 years ago
So what is in /home/cubie/Desktop/npm-debug.log?
Problem solved. On the official decision was written by:
You know what you need for you system, basically your appropriate analog of build-essential. Keep rocking! Ubuntu renamed the node
binary nodejs
which can cause problems building node-serialport
. The fix is simple, install the nodejs-legacy package that symlinks /usr/bin/nodejs => /usr/bin/node
or install the more up to date nodejs package from Chris Lea's PPA.
# Ubuntu node
sudo apt-get install nodejs nodejs-legacy
# Or Chris Lea's PPA Node (more up to date)
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install build-essential
npm install serialport
When installing serialport or any Drugova module that works with the tty, shown similar error:
This failure might be due to the use of legacy binary "node" npm WARN For further explanations, please read /usr/shareThis 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! serialport@1.4.10 install:
node-pre-gyp install --fallback-to-build
npm ERR! Exit status 127 npm ERR! npm ERR! Failed at the serialport@1.4.10 install script. npm ERR! This is most likely a problem with the serialport package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-pre-gyp install --fallback-to-build npm ERR! You can get their info via: npm ERR! npm owner ls serialport npm ERR! There is likely additional logging output above.npm ERR! System Linux 3.4.79-sun4i npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "serialport" npm ERR! cwd /home/cubie/Desktop npm ERR! node -v v0.10.29 npm ERR! npm -v 1.4.21 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/cubie/Desktop/npm-debug.log npm ERR! not ok code 0 /doc/nodejs/README.Debian
npm ERR! serialport@1.4.10 install:
node-pre-gyp install --fallback-to-build
npm ERR! Exit status 127 npm ERR! npm ERR! Failed at the serialport@1.4.10 install script. npm ERR! This is most likely a problem with the serialport package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-pre-gyp install --fallback-to-build npm ERR! You can get their info via: npm ERR! npm owner ls serialport npm ERR! There is likely additional logging output above.npm ERR! System Linux 3.4.79-sun4i npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "serialport" npm ERR! cwd /home/cubie/Desktop npm ERR! node -v v0.10.29 npm ERR! npm -v 1.4.21 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/cubie/Desktop/npm-debug.log npm ERR! not ok code 0