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

Can't install pm2 at centos6 #232

Closed
kelvinlee opened this issue Dec 25, 2013 · 17 comments
Closed

Can't install pm2 at centos6 #232

kelvinlee opened this issue Dec 25, 2013 · 17 comments

Comments

@kelvinlee
Copy link

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.

@ransomweaver
Copy link

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
sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error
gyp ERR! stack Error: 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])

@olostan
Copy link

olostan commented Dec 27, 2013

Same problem. Seems that problem with 'usage' module. You can track issue here: arunoda/node-usage/issues/19

@avaranovich
Copy link

Try to downgrade you system python to python2.6. It worked for me on ubuntu.

@Unitech
Copy link
Owner

Unitech commented Jan 14, 2014

For the OSError: [Errno 13] Permission denied maybe you can try npm install -g pm2@latest --unsafe-perm

@workingmatt
Copy link

There is a simple workaround to get pm2 working on CentOS 6.4 please see my final comment posted today at arunoda/node-usage#19

@MariusStuparu
Copy link

Did that, the problem remains.

@OscarBarrett
Copy link

@workingmatt That worked for me.

@MariusStuparu
Copy link

@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.

@rlidwka
Copy link
Collaborator

rlidwka commented Feb 3, 2014

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).

@workingmatt
Copy link

@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

@MariusStuparu
Copy link

@rlidwka It doesn't, it stops at the same node-gyp error.
@workingmatt I tried it, the same

@mob-hyunmin
Copy link

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"

@MariusStuparu
Copy link

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.

@rlidwka
Copy link
Collaborator

rlidwka commented Feb 12, 2014

[email protected] installs fine, [email protected] fails... any update on this?

@rlidwka
Copy link
Collaborator

rlidwka commented Feb 28, 2014

this seem to be fixing it.

@smazurov
Copy link

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.

@soyuka
Copy link
Collaborator

soyuka commented May 11, 2014

As of 1bedf10 there is no C bindings anymore, this should work but I'd be glad to have a confirmation! Thanks.

@soyuka soyuka closed this as completed Jun 13, 2014
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