Closed mortie closed 4 years ago
Here's the log file the error is talking about: 2017-06-07T07_23_31_692Z-debug.log.txt
These are the interesting lines. Especially the one about permissions.
node-pre-gyp ERR! Tried to download: https:///node-v57-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for udev@0.4.0 and node@8.0.0 (node-v57 ABI) (falling back to source compile with node-gyp)
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/8.0.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/udev/.node-gyp"
@mortie
This normally happens when trying to do the install offline. This udev module depends on the prebuilt c++ node headers. You need to the build once on the internet or you need pre download the files into the .node-gyp folder. This is an issue with the environment of the machine not with the udev module.
@nbroeking or @cheery are you able to install and run on a rPi with node 8.x?
I've got a lot of errors, most the same as above
I had it working before, but I broke my SD card. Can't remember how it worked :(.
@zoutepopcorn I will try this. It's been a while I've popped up rPi and used it for something. I probably use the newest one I have, it's probably rPi 2 or rPi 3. I'll tell how it went later this week.
Maybe this did the trick last time
rm -rf ~/.node-gyp
But have to test it later on the pi
@zoutepopcorn I loaded raspbian lite version and tried things out. Here's what I found out.
It would appear that debian renames node
to nodejs
because Node developers were naive in choosing their executable name on Linux platforms. The installation scripts still try to use the node
command, but they find the software that debian calls node
. That can cause this to fail, but it would fail earlier. Your script shows that it already gets to build the module.
I skipped the issue by adding a symbolic link node -> /usr/bin/nodejs
into a directory, then I exported that directory to a PATH environment variable.
Another thing I did was I installed udev C headers with the following apt command:
sudo apt-get install lib-udev-dev
Then it worked. Though the steps I took didn't reproduce this issue. Unless it's the same problems as here, just manifesting in some illegible manner.
Great.
This article pointed me howto install:
https://community.roonlabs.com/t/howto-powermate-extension-on-a-raspberry-pi/23819
You can get your nodejs info to install on the pi using:
cat /proc/cpuinfo
And then download the right one
wget https://nodejs.org/dist/v7.8.0/node-v7.8.0-linux-armv7l.tar.gz
@mortie is this working for you?
I think this issue can be closed. I just tried compiling it on an RPi 4 running the latest Raspbian (September 2019) with the latest 8.x (8.16.2) and it seems to work fine. Also builds for 10.x though not for 12.x, which is being tracked in #30
You're right. Lets close it.
The console output from
sudo npm install -g udev