Can't install pm2 at centos6
OSError: [Errno 13] Permission denied
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 2.6.32-042stab083.2
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/pm2/node_modules/usage
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
npm http GET https://registry.npmjs.org/keypress
npm http 200 https://registry.npmjs.org/keypress
npm http GET https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz
npm http 200 https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz
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 usage 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 usage
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-042stab083.2
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pm2" "-g"
npm ERR! cwd /usr/src/node-v0.10.24
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/src/node-v0.10.24/npm-debug.log
npm ERR! not ok code 0
I have no idea about this , so how to fix this?
ty.
I can't install pm2 on Centos6 either:
[email protected] install /usr/lib/node_modules/pm2/node_modules/usage node-gyp rebuild
npm http 304 https://registry.npmjs.org/keypress
Traceback (most recent call last):
File "/usr/lib/node_modules/node-gyp/gyp/gyp_main.py", line 18, in gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.11.6-x86_64-linode35
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/pm2/node_modules/usage
gyp ERR! node -v v0.10.22
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0
The gyp install looked like this:
...
npm http 304 https://registry.npmjs.org/hoek /usr/bin/node-gyp -> /usr/lib/node_modules/node-gyp/bin/node-gyp.js npm WARN unmet dependency /usr/lib/node_modules/block-stream requires inherits@'~2.0.0' but will load npm WARN unmet dependency undefined, npm WARN unmet dependency which is version undefined npm WARN unmet dependency /usr/lib/node_modules/fstream requires inherits@'~2.0.0' but will load npm WARN unmet dependency undefined, npm WARN unmet dependency which is version undefined npm WARN unmet dependency /usr/lib/node_modules/fstream-ignore requires inherits@'2' but will load npm WARN unmet dependency undefined, npm WARN unmet dependency which is version undefined npm WARN unmet dependency /usr/lib/node_modules/fstream-npm requires inherits@'2' but will load npm WARN unmet dependency undefined, npm WARN unmet dependency which is version undefined npm WARN unmet dependency /usr/lib/node_modules/glob requires inherits@'2' but will load npm WARN unmet dependency undefined, npm WARN unmet dependency which is version undefined npm WARN unmet dependency /usr/lib/node_modules/npmconf requires inherits@'~2.0.0' but will load npm WARN unmet dependency undefined, npm WARN unmet dependency which is version undefined npm WARN unmet dependency /usr/lib/node_modules/tar requires inherits@'2' but will load npm WARN unmet dependency undefined, npm WARN unmet dependency which is version undefined [email protected] /usr/lib/node_modules/node-gyp ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ([email protected]) ├── [email protected] ├── [email protected] ([email protected]) ├── [email protected] ([email protected]) ├── [email protected] ([email protected], [email protected]) ├── [email protected] ([email protected]) ├── [email protected] ([email protected], [email protected]) └── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
Same problem. Seems that problem with 'usage' module. You can track issue here: arunoda/node-usage/issues/19
Try to downgrade you system python to python2.6. It worked for me on ubuntu.
For the OSError: [Errno 13] Permission denied maybe you can try npm install -g pm2@latest --unsafe-perm
There is a simple workaround to get pm2 working on CentOS 6.4 please see my final comment posted today at https://github.com/arunoda/node-usage/issues/19
Did that, the problem remains.
@workingmatt That worked for me.
@Unitech is it possible to install pm2 globaly from this git repo? I mean, after cloning it into ~/npm/lib/node_modules and doing npm install and making a symlink to ~/npm/bin, what else should I do to make it work?
This is a very annoying error from the gyp module. I have even tried re-installing the python gyp module, and still doesn't work.
is it possible to install pm2 globaly from this git repo?
npm install -g Unitech/pm2
No idea if it works, but npm itself seems to be installable just fine this way (source).
@mariusstuparu the -g flag @rlidwka suggests should work. Did you read my post I linked to 11 days ago above? It shows how I got pm2 to install globally and get over the node-gyp fault
@rlidwka It doesn't, it stops at the same node-gyp error. @workingmatt I tried it, the same
How about this? When I upgrade my node.js and pm2, this is worked for me.
1.install rpm(my centos needs this) libstdc++-devel-4.4.7-4.el6.x86_64, gcc-c++-4.4.7-4.el6.x86_64
2.rebuild node-gyp {shell}>"node" "{installed node.js path}/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
Something did the trick, because now it installed with --unsafe-perm, but only after I erased all traces of Node and Npm, and installed it again from source. Maybe the Yum packages are corrupt somehow.
[email protected] installs fine, [email protected] fails... any update on this?
this seem to be fixing it.
I managed to fix this for my install.
Few notes:
- CentOS 6.4
- Linode Box, kernel, etc
- node 0.10.26 (installed using EPEL)
- npm 1.3.6 (installed using EPEL)
Relevant error:
...
make: Entering directory `/usr/lib/node_modules/pm2/node_modules/usage/build'
CXX(target) Release/obj.target/sysinfo/src/binding.o
SOLINK_MODULE(target) Release/obj.target/sysinfo.node
SOLINK_MODULE(target) Release/obj.target/sysinfo.node: Finished
COPY Release/sysinfo.node
make: Leaving directory `/usr/lib/node_modules/pm2/node_modules/usage/build'
/usr/bin/pm2 -> /usr/lib/node_modules/pm2/bin/pm2
npm WARN unmet dependency /usr/lib/node_modules/block-stream requires inherits@'~2.0.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/fstream requires inherits@'~2.0.0' but will load
npm WARN unmet dependency undefined,
...
What i discovered is that EPEL repo uses inherits@2 directory and symlinks inherits to it under /usr/lib/node_modules
Here's what I had to do to fix this:
$ cd /usr/lib/node_modules
$ unlink inherits
$ rm -rf inherits\@2/
$ npm install -g inherits
Running npm install -g pm2 proceeded without further issues.
I imagine this breaks yum update in the future.
As of https://github.com/Unitech/pm2/commit/1bedf104976702afd9e2aadc7d0a9c0bc3d1a847 there is no C bindings anymore, this should work but I'd be glad to have a confirmation! Thanks.