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

Error installing i2c #55

Open
hyprstack opened this issue Jun 21, 2014 · 3 comments
Open

Error installing i2c #55

hyprstack opened this issue Jun 21, 2014 · 3 comments

Comments

@hyprstack
Copy link

When I type "npm install i2c" I get the following error:

[email protected] install /Users/mario/node_modules/i2c
node-gyp rebuild

CXX(target) Release/obj.target/i2c/src/i2c.o
In file included from ../src/i2c.cc:11:
../src/i2c-dev.h:27:10: fatal error: 'linux/types.h' file not found

include <linux/types.h>

     ^

1 error generated.
make: *** [Release/obj.target/i2c/src/i2c.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Darwin 13.2.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/mario/node_modules/i2c
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the i2c 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 i2c
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "i2c"
npm ERR! cwd /Users/mario
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/mario/npm-debug.log
npm ERR! not ok code 0

What is wrong here?

@timfpark
Copy link
Contributor

Are you doing it on the Raspberry Pi? Only the Raspberry Pi will have the headers for I2C that this module is looking for...

@hyprstack
Copy link
Author

No, I was just following the tutorial and it started with "npm install i2c".
So do I need to get the hardware? Help me out here, this is new to me. Thanks

@timfpark
Copy link
Contributor

Yes, to use i2c you need hardware that supports it. We are bringing Raspberry Pis, so you don't need to buy your own.

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

2 participants