Você poderia relatar este bug para o rastreador de bug Buildroot, no link ?
Estou usando buildroot (versão 2013.08.1) para gerar o sistema de arquivos e ferramentas de compilação cruzada para implementar o Linux incorporado em um processador i.MX233 (arquitetura ARM). Eu adiciono o módulo serialport executando make menuconfig
e selecionando:
Target Package -->
Interpreter languages and scripting -->
[*]nodejs
[*] NPM for the target
[*] Express web application framework
[*] CoffeeScript
(socket.io jade serialport) Additional modules
Ao executar o Makefile, recebo a seguinte saída referente ao módulo serialport:
node-pre-gyp http GET https://node-serialport.s3.amazonaws.com/serialport/v1.4.0/Release/v8-3.11-linux-x64.tar.gz
node-pre-gyp http 200 https://node-serialport.s3.amazonaws.com/serialport/v1.4.0/Release/v8-3.11-linux-x64.tar.gz
node-pre-gyp ERR! UNCAUGHT EXCEPTION
node-pre-gyp ERR! stack Error: EPERM, chmod '/media/d/Documents/b-tesis/buildroot-2013.08.1/output/target/usr/lib/node_modules/serialport/build/serialport/v1.4.0/Release/v8-3.11-linux-x64/serialport.node'
node-pre-gyp ERR! System Linux 3.13.0-24-generic
node-pre-gyp ERR! command "node" "/media/d/Documents/b-tesis/buildroot-2013.08.1/output/target/usr/lib/node_modules/serialport/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /media/d/Documents/b-tesis/buildroot-2013.08.1/output/target/usr/lib/node_modules/serialport
node-pre-gyp ERR! node -v v0.8.22
node-pre-gyp ERR! node-pre-gyp -v v0.5.19
node-pre-gyp ERR! This is a bug in 'node-pre-gyp'.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR! <https://github.com/mapbox/node-pre-gyp/issues>
npm ERR! [email protected] install: 'node-pre-gyp install --fallback-to-build'
npm ERR! 'sh "-c" "node-pre-gyp install --fallback-to-build"' failed with 7
npm ERR!
npm ERR! Failed at the [email protected] 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.13.0-24-generic
npm ERR! command "/media/d/Documents/b-tesis/buildroot-2013.08.1/output/host/usr/bin/node" "/media/d/Documents/b-tesis/buildroot-2013.08.1/output/host/usr/bin/npm" "install" "express" "coffee-script" "socket.io" "jade" "serialport"
npm ERR! cwd /media/d/Documents/b-tesis/buildroot-2013.08.1/output/target/usr/lib
npm ERR! node -v v0.8.22
npm ERR! npm -v 1.2.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /media/d/Documents/b-tesis/buildroot-2013.08.1/output/target/usr/lib/npm-debug.log
npm ERR! not ok code 0
make: *** [/media/d/Documents/b-tesis/buildroot-2013.08.1/output/build/nodejs-0.8.22/.stamp_target_installed] Error 1
Eu tentei instalar uma versão de nó diferente usando nvm
, mas isso não funciona. Não encontrei nenhuma solução diferente no Google.
Estou fazendo esse processo em uma máquina com o Ubuntu 14.04 e a versão 3.13.0-24-genérica do kernel.
Gostaria de receber ajuda com esse problema.
Você poderia relatar este bug para o rastreador de bug Buildroot, no link ?
Você precisa ter permissões de root para instalar esses módulos nativos, como o serialport.
Entre em /buildroot/package/nodejs/nodejs.mk
e altere
$(NPM) install -g $(NODEJS_MODULES_LIST)
para
$(NPM) install -g --unsafe-perm $(NODEJS_MODULES_LIST)