Closed adityapatadia closed 8 years ago
This issues is related to how npm install
handles privileges. Attempting to install any native module globally as root with -g
will result in the same errors. For example, npm install -g buffertools
will result in the same errors. To avoid the issue use npm install --unsafe-perm -g epoll
instead.
root@beaglebone:~# uname -a
Linux beaglebone 4.1.12-ti-r29 #1 SMP PREEMPT Mon Nov 9 22:46:19 UTC 2015 armv7l GNU/Linux
root@beaglebone:~# node -v
v0.10.38
root@beaglebone:~# npm -v
1.4.21
root@beaglebone:~# npm install --unsafe-perm -g epoll
-
> epoll@0.1.16 install /usr/local/lib/node_modules/epoll
> node-gyp rebuild
make: Entering directory '/usr/local/lib/node_modules/epoll/build'
CXX(target) Release/obj.target/epoll/src/epoll.o
SOLINK_MODULE(target) Release/obj.target/epoll.node
SOLINK_MODULE(target) Release/obj.target/epoll.node: Finished
COPY Release/epoll.node
make: Leaving directory '/usr/local/lib/node_modules/epoll/build'
epoll@0.1.16 /usr/local/lib/node_modules/epoll
├── bindings@1.2.1
└── nan@2.1.0
The issue affects all users of OctalBoneScript. Since they install OBS as npm install -g octalbonescript
. Do you suggest installing OBS with npm install -g --unsafe-perm octalbonescript
?
If it's necessary to install OBS globally as root I don't think they have another choice. Why is it necessary to install globally? Would it not be better to recommend npm install octalbonescript
instead?
I think you are correct. I should recommend them to install on per project basis with package.json files. I will also write that if someone wants to install globally, how to do it.
Thanks for help.
You're welcome :)
Hi I downloaded latest Debian 8.2 image for BeagleBone Black and installed it. After that, I tried
npm install -g epoll
. It gives following error.