rsg98 / node-wiring-pi

Node.js bindings to wiringPi
7 stars 8 forks source link

Not possible to install? #1

Open StefanMeGit opened 7 years ago

StefanMeGit commented 7 years ago

HI!

I installed wiringPI like this: http://wiringpi.com/download-and-install/

but when i try to

i got: osmc@OSMC:~/wiringPi$ sudo npm install -g node-wiring-pi

> node-wiring-pi@0.0.3 install /usr/local/lib/node_modules/node-wiring-pi
> /bin/bash ./install.sh

dpkg-query: Paket »wiringpi« ist nicht installiert und es ist keine Information verfügbar
Verwenden Sie dpkg --info (= dpkg-deb --info) zum Untersuchen von Archiven
und dpkg --contents (= dpkg-deb --contents) zum Auflisten ihres Inhalts.
dpkg-query: Kein Paket gefunden, das auf wiringpi passt
Checking for wiringpi:
Could not find wiringpi package - try 'sudo apt-get install wiringpi'
npm ERR! Linux 4.4.27-7-osmc
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "node-wiring-pi"
npm ERR! node v4.2.1
npm ERR! npm  v2.14.7
npm ERR! code ELIFECYCLE

npm ERR! node-wiring-pi@0.0.3 install: `/bin/bash ./install.sh`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-wiring-pi@0.0.3 install script '/bin/bash ./install.sh'.
npm ERR! This is most likely a problem with the node-wiring-pi package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     /bin/bash ./install.sh
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-wiring-pi
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/osmc/wiringPi/npm-debug.log
rsg98 commented 7 years ago

At the moment, it checks to see if you have the Debian package installed - I should change it so it actually looks for the libraries and headers instead! That would mean it should install irrespective of how you installed Wiring Pi.

As a workaround, you can install WiringPi using apt-get - e.g.

sudo apt-get install wiringpi

Then sudo npm -g install node-wiring-pi should work.

If anyone knows of a better way of checking dependencies external to node, let me know!

StefanMeGit commented 7 years ago

When i try to install it over npm, he can't found it:

osmc@OSMC:~$ sudo apt-get install wiringpi
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
E: Paket wiringpi kann nicht gefunden werden.

means PACKET wiring could not be found

rsg98 commented 7 years ago

I guess you're running OSMC instead of Raspbian?

You could try adding the Raspbian repository to your APT sources:

http://www.raspbian.org/RaspbianRepository

...but I've never tried this (or OSMC) - it might cause a load of package conflicts and break things! (If after adding to your sources.list and apt-get update; apt-get install wiringpi suggests loads of updates, I would cancel and wait for the updates module that doesn't depend on the Raspbian package)

Kepete commented 6 years ago

I have similar problem. sudo npm -g install node-wiring-pi doesn't help.

screen shot 2018-01-24 at 19 04 46

sudo apt-get install wiringpi is already installed:

screen shot 2018-01-24 at 19 08 03