Install problems on Beagle Board Black / Ubuntu #305

jackjohnsonsd opened this Issue Feb 9, 2014 · 4 comments


None yet

4 participants



I'm trying to install serialport on a beagle board black running Ubuntu.
I get the following. On this version of Ubuntu node is called "nodejs" not "node".

I notice that the binding.gyp file has these lines.

  'include_dirs': [
    '<!(node -e "require(\'nan\')")'

I suspect this may be the issue but I'm not technically cable of making the changes and testing this myself.

Jack Johnson

serialport@1.3.1 install /home/node_modules/serialport
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:789:12)
gyp ERR! System Linux 3.8.13-bone30
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/node_modules/serialport
gyp ERR! node -v v0.10.15
gyp ERR! node-gyp -v v0.10.9
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

reconbot commented Feb 9, 2014

Hi @jackjohnsonsd you guessed right. Please see #301 on this issue. It recommends installing the nodejs-legacy package to fix your issue. It also links to more details on possible fixes.

rlemon commented Feb 10, 2014

as a point of interest - I did have this working on the BBB with the stock node 0.8.22 on the eMMC Angstrom image... however now that I'm looking to reproduce it for you I am getting a similar error.

I will update once I figure out what I did to get this working on the BBB (out of the box image) .

for the record this is my error currently:

> serialport@1.3.1 install /home/root/dev/test/node_modules/serialport
> node-gyp rebuild

make: Entering directory `/home/root/dev/test/node_modules/serialport/build'
make: Warning: File `../../../../../.node-gyp/0.8.22/common.gypi' has modification time 415910637 s in the future
  ACTION Regenerating Makefile
gyp: binding.gyp not found (cwd: /home/root/dev/test/node_modules/serialport/build) while trying to load binding.gyp
make: *** [Makefile] Error 1
make: Leaving directory `/home/root/dev/test/node_modules/serialport/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:256:23)

I've been doing a lot of work with NodeJS on the BeagleBone lately. I'd strongly recommend moving to either build NodeJS from source or switch distributions to run Arch Linux which has much more up to date builds of NodeJS in their package repositories.

Arch Linux is a little harder to get started with, but I was running into some significant reliability issues (OS hanging) that went away when I moved from Ubuntu to Arch.


@rvagg, this is the second bug with that include_dirs approach that I was referring to.

@reconbot reconbot closed this Apr 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment