Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

instructions for getting it to run on raspberry 2 #28

Open
snizzleorg opened this issue Nov 29, 2015 · 13 comments
Open

instructions for getting it to run on raspberry 2 #28

snizzleorg opened this issue Nov 29, 2015 · 13 comments

Comments

@snizzleorg
Copy link

Has anyone gotten this to work on the rasberrypi2?
I fail to get the nam install command to work. with the apt-get supplied node and npm

anyone has it running successfully?

@htreu
Copy link
Owner

htreu commented Nov 29, 2015

Please provide more information: node version, npm version, stack trace.

@velaar
Copy link

velaar commented Dec 2, 2015

Hi, I have it running on RPi2 but I am using Gentoo Linux. No issues for the "running" part. (except for #25)
node is 0.12.7

@snizzleorg
Copy link
Author

steffen@automator ~ $ node -v
v4.2.1
steffen@automator ~ $ npm -v
2.14.7
steffen@automator ~/OpenHAB-HomeKit-Bridge $ npm install
npm WARN deprecated lodash@2.4.1: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^3.0.0.

> utf-8-validate@1.2.1 install /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
 ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.7-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 

> bufferutil@1.2.1 install /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.7-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/ws/node_modules/bufferutil
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm WARN optional dep failed, continuing utf-8-validate@1.2.1
npm WARN optional dep failed, continuing bufferutil@1.2.1
\
> curve25519@1.1.0 install /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/curve25519
> node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.7-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/curve25519
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 

> bignum@0.11.0 install /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/srp/node_modules/bignum
> node-gyp configure build

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.7-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/srp/node_modules/bignum
gyp ERR! node -v v4.2.1

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.7-v7+
command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/ed25519
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 

> mdns@2.2.10 install /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/mdns
> node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.7-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/mdns
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm ERR! Linux 4.1.7-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.2.1
npm ERR! npm  v2.14.7
npm ERR! code ELIFECYCLE

npm ERR! curve25519@1.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the curve25519@1.1.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the curve25519 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 curve25519
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/steffen/OpenHAB-HomeKit-Bridge/npm-debug.log

@yozik04
Copy link

yozik04 commented Dec 4, 2015

@snizzleorg
apt-get node version will not work.
You need to install 0.12.x

add node official apt sources to /etc/apt/sources.list.d/nodesource.list

deb https://deb.nodesource.com/node_0.12 wily main
deb-src https://deb.nodesource.com/node_0.12 wily main

Do not forget to change wily to your distribution.

@snizzleorg
Copy link
Author

thats what I did now . maybe it helps others:

curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
echo 'deb https://deb.nodesource.com/node_0.12 jessie main' > /etc/apt/sources.list.d/nodesource.list
echo 'deb-src https://deb.nodesource.com/node_0.12 jessie main' >> /etc/apt/sources.list.d/nodesource.list

sudo apt-get update
sudo apt-get install nodejs

npm -v
2.14.9
node -v
v0.12.8

git clone https://github.com/htreu/OpenHAB-HomeKit-Bridge.git
cd OpenHAB-HomeKit-Bridge
npm cache clean
npm install

and thats what I get:

npm install
-
> curve25519@1.1.0 install /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/curve25519
> node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1075:12)
gyp ERR! System Linux 4.1.7-v7+
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/curve25519
gyp ERR! node -v v0.12.8
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 

> bignum@0.11.0 install /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/srp/node_modules/bignum
> node-gyp configure build

Usage: gyp_main.py [options ...] [build_file ...]
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1075:12)
gyp ERR! System Linux 4.1.7-v7+
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/srp/node_modules/bignum
gyp ERR! node -v v0.12.8
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 

> ed25519@0.0.3 install /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/ed25519
> node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1075:12)
gyp ERR! System Linux 4.1.7-v7+
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/ed25519
gyp ERR! node -v v0.12.8
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 

> mdns@2.2.10 install /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/mdns
> node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1075:12)
gyp ERR! System Linux 4.1.7-v7+
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/mdns
gyp ERR! node -v v0.12.8
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm ERR! Linux 4.1.7-v7+
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v0.12.8
npm ERR! npm  v2.14.9
npm ERR! code ELIFECYCLE

npm ERR! curve25519@1.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the curve25519@1.1.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the curve25519 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 curve25519
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/steffen/OpenHAB-HomeKit-Bridge/npm-debug.log

@snizzleorg
Copy link
Author

strange thing is that in the error messages it shows:

node-gyp -v v3.0.3

while when I run it:

node-gyp -v v3.2.0

@snizzleorg
Copy link
Author

as a side note I got it installing under ubuntu trusty on x64 without any problem.
But it still crashes when run:

steffen@snizzlenas:~/src/OpenHAB-HomeKit-Bridge$ npm start -- --pincode 031-45-154 --server 192.168.178.94:8080 --sitemap default

> openHAB-HomeKit-Bridge@1.2.0 start /home/steffen/src/OpenHAB-HomeKit-Bridge
> node index.js start "--pincode" "031-45-154" "--server" "192.168.178.94:8080" "--sitemap" "default"

*** WARNING *** The program 'nodejs' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs>
*** WARNING *** The program 'nodejs' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs&f=DNSServiceRegister>
Missing "name" argument.
Try "--help" for more information.

npm ERR! Linux 3.13.0-71-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start" "--" "--pincode" "031-45-154" "--server" "192.168.178.94:8080" "--sitemap" "default"
npm ERR! node v0.12.8
npm ERR! npm  v2.14.9
npm ERR! code ELIFECYCLE
npm ERR! openHAB-HomeKit-Bridge@1.2.0 start: `node index.js start "--pincode" "031-45-154" "--server" "192.168.178.94:8080" "--sitemap" "default"`
npm ERR! Exit status 255
npm ERR! 
npm ERR! Failed at the openHAB-HomeKit-Bridge@1.2.0 start script 'node index.js start "--pincode" "031-45-154" "--server" "192.168.178.94:8080" "--sitemap" "default"'.
npm ERR! This is most likely a problem with the openHAB-HomeKit-Bridge package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node index.js start "--pincode" "031-45-154" "--server" "192.168.178.94:8080" "--sitemap" "default"
npm ERR! You can get their info via:
npm ERR!     npm owner ls openHAB-HomeKit-Bridge
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/steffen/src/OpenHAB-HomeKit-Bridge/npm-debug.log

@snizzleorg
Copy link
Author

my miskatek, forgot to specify the name. it runs on ubuntu, but still no luck on the raspy

@markus7017
Copy link

Did you found the problem. I encountered the same on my raps

@snizzleorg
Copy link
Author

@markus7017 I finally used the docker image.

@glmnet
Copy link

glmnet commented Jun 14, 2016

can somebody elaborate a step list to get it working on the pi?
I have a raspbian jessie

@ozobken
Copy link

ozobken commented Jul 10, 2016

I've got a long way, but it still dies at runtime - If you have a pi2, with an armv7, you can use the node builds from nodesource, but if you have a earlier pi that's armv6, it's a little more tricky, but there are various precompiled builds of node around - I grabbed one from:

wget https://nodejs.org/dist/v4.0.0/node-v4.0.0-linux-armv6l.tar.gz

I installed all the various dependencies, but I get:

raspberrypi:ken 306> npm start -- --name "myOpenHAB-Bridge" --server 127.0.0.1:8080 --sitemap demo

openHAB-HomeKit-Bridge@1.3.3 start /home/ken/openhab/OpenHAB-HomeKit-Bridge-master
node index.js start "--name" "myOpenHAB-Bridge" "--server" "127.0.0.1:8080" "--sitemap" "demo"

/home/ken/openhab/OpenHAB-HomeKit-Bridge-master/node_modules/babel-core/node_modules/babel-traverse/lib/scope/index.js:59
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key i

SyntaxError: Unexpected identifier
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:413:25)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/home/ken/openhab/OpenHAB-HomeKit-Bridge-master/node_modules/babel-core/node_modules/babel-traverse/lib/path/index.js:33:14)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)

npm ERR! Linux 4.1.17+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" "--" "--name" "myOpenHAB-Bridge" "--server" "127.0.0.1:8080" "--sitemap" "demo"
npm ERR! node v4.0.0
npm ERR! npm v2.14.2
npm ERR! code ELIFECYCLE
npm ERR! openHAB-HomeKit-Bridge@1.3.3 start: node index.js start "--name" "myOpenHAB-Bridge" "--server" "127.0.0.1:8080" "--sitemap" "demo"
npm ERR! Exit status 1

anyone have any thoughts? I'm a long way from a JS/node expert!

I might try grabbing https://nodejs.org/dist/v4.1.2/node-v4.1.2-linux-armv6l.tar.gz and see if that works better - shrug

@ozobken
Copy link

ozobken commented Jul 10, 2016

Nope - 4.1.2 doesn't help - I'll open this as a separate ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants