Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

npm install fails on 64bit openSuse #15

Closed
jano-petras opened this issue Apr 10, 2014 · 19 comments
Closed

npm install fails on 64bit openSuse #15

jano-petras opened this issue Apr 10, 2014 · 19 comments

Comments

@jano-petras
Copy link

Unable to install protagonist on 64bit openSuse linux install.

xxxx@linux:~> npm install protagonist
npm http GET https://registry.npmjs.org/protagonist
npm http 304 https://registry.npmjs.org/protagonist
npm http GET https://registry.npmjs.org/protagonist/-/protagonist-0.10.0.tgz
npm http 200 https://registry.npmjs.org/protagonist/-/protagonist-0.10.0.tgz

> protagonist@0.10.0 install /home/xxxx/node_modules/protagonist
> node-gyp rebuild

gyp: /usr/share/node/common.gypi not found (cwd: /home/xxxx/node_modules/protagonist) while reading includes of binding.gyp while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib64/node_modules/npm/node_modules/node-gyp/lib/configure.js:417:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:784:12)
gyp ERR! System Linux 3.11.10-7-desktop
gyp ERR! command "node" "/usr/lib64/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/xxxx/node_modules/protagonist
gyp ERR! node -v v0.10.5
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok 
npm ERR! protagonist@0.10.0 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! 
npm ERR! Failed at the protagonist@0.10.0 install script.
npm ERR! This is most likely a problem with the protagonist 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 protagonist
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.10-7-desktop
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "protagonist"
npm ERR! cwd /home/xxxx
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/xxxx/npm-debug.log
npm ERR! not ok code 0
xxxx@linux:~> 
@zdne
Copy link
Contributor

zdne commented Apr 17, 2014

@jano-petras does this problem still persists? Are you able to debug it?

Do not have a vagrant 64bit openSuse box at hand...

@jano-petras
Copy link
Author

Yes it does. I don't know how to debug as haven't worked with node yet.

I have gotten a fresh copy of protagonist from git and tried installing as root using npm from local folder, still the same issue.

Also modified the bindings.gypi / includes section to prefix common.gypi with a ./ to force it to look in the current directory rather then in /usr/share/node/ folder (because the file is there) but still the same...

@cesarizu
Copy link

I ran into the same problem. You need to install node-devel for it to work.
zypper in nodejs-devel

@mustela
Copy link

mustela commented Aug 22, 2014

I'm having the same issue on OS X 10.9.4 and node version 0.10.26

@zdne
Copy link
Contributor

zdne commented Aug 22, 2014

@mustela does solution @cesarizu suggest helps?

@mustela
Copy link

mustela commented Aug 22, 2014

@zdne I'm not sure how to install "node-devel", I'm new with it. I've tried a few things but no success

@zdne
Copy link
Contributor

zdne commented Aug 22, 2014

@mustela I have just checked on my system:

$ node -v
v0.10.26

$ npm -v
1.4.3

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix

$ sw_vers -productVersion
10.9.4

Running:

$ npm install protagonist
$ cd node_modules/protagonist
$ npm install
$ npm test

Works just fine. Please make sure to have Xcode CLI tools installed.

@mustela
Copy link

mustela commented Aug 25, 2014

Hi @zdne I have exactly the same configuration, and xcode cli tools installed, but having the following issue when I try to run "npm install protagonist"

npm http GET https://registry.npmjs.org/protagonist
npm http 304 https://registry.npmjs.org/protagonist

protagonist@0.12.1 install /Users/mustela/node_modules/protagonist
node-gyp rebuild

CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/HTTP.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/MarkdownBlock.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/MarkdownParser.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/Parser.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/ParserCore.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/Serialize.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/SerializeJSON.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/SerializeYAML.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/UriTemplateParser.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/snowcrash.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/csnowcrash.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/CBlueprint.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/CSourceAnnotation.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/posix/RegexMatch.o
LIBTOOL-STATIC Release/snowcrash.a
libtool: unrecognized option -static' libtool: Trylibtool --help' for more information.
make: *** [Release/snowcrash.a] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Darwin 13.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/xxxx/node_modules/protagonist
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! protagonist@0.12.1 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the protagonist@0.12.1 install script.
npm ERR! This is most likely a problem with the protagonist 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 protagonist
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "protagonist"
npm ERR! cwd /Users/xxxx
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/xxxx/npm-debug.log
npm ERR! not ok code 0

@abtris
Copy link
Contributor

abtris commented Aug 25, 2014

@mustela Do you use for install nodejs via nvm or homebrew?

@zdne
Copy link
Contributor

zdne commented Aug 25, 2014

@mustela this look like related to this strange libtool issues here – apiaryio/snowcrash#93 (comment) can you please try the proposed solution from there? Sorry about that.

@mustela
Copy link

mustela commented Aug 25, 2014

@zdne I did that, remove the libtool and link it from the CLT but same results.

@abtris I'm using nvm

Thanks guys!

@zdne
Copy link
Contributor

zdne commented Aug 27, 2014

That is very unfortunate. To be honest I do not really understand what the issue with libtool is. Neither I am experiencing the problems – but apparently something is not installed properly on the box you are trying to run.

What is gcc --version Are you using Xcode or Xcode CLI tools? If so what are the versions there?

@cmoro-deusto
Copy link

Hi

just wanted to add that it also fails on Ubuntu 14.04 64bits.

$ node -v
v0.10.32
$ npm -v
1.4.28
$ gcc --version
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2

@devsdmf
Copy link

devsdmf commented Nov 24, 2014

HI guys, same problem on CentOS 6.6, follow installation log and lib versions:

> ws@0.4.31 install /usr/local/awmailer/node_modules/aglio/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)


> protagonist@0.17.1 install /usr/local/awmailer/node_modules/aglio/node_modules/protagonist
> node-gyp rebuild

Traceback (most recent call last):
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    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/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:797:12)
gyp ERR! System Linux 2.6.32-431.17.1.el6.x86_64
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/awmailer/node_modules/aglio/node_modules/protagonist
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm ERR! protagonist@0.17.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the protagonist@0.17.1 install script.
npm ERR! This is most likely a problem with the protagonist 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 protagonist
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 2.6.32-431.17.1.el6.x86_64
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "aglio"
npm ERR! cwd /usr/local/awmailer
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /usr/local/awmailer/npm-debug.log
npm ERR! not ok code 0
$ node -v
v0.10.26
$ npm -v
1.4.3
$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)

@zdne
Copy link
Contributor

zdne commented Nov 25, 2014

Hey @devsdmf this seems to be a different problem, possibly related to Python (used to generate makefiles) – what is your Python version?

@devsdmf
Copy link

devsdmf commented Nov 25, 2014

Hi @zdne, follow my python version:

$ python --version
Python 2.6.6

@devsdmf
Copy link

devsdmf commented Dec 3, 2014

Any news?

@akademy
Copy link

akademy commented Feb 18, 2015

I had this problem on OpenSuse and @cesarizu suggestion worked. Just install devel with:
zypper in nodejs-devel

(Note: it's called "nodejs-devel" not "node-devel" as @mustela mentioned.)

@pksunkara
Copy link
Contributor

@devsdmf Updating your npm should solve your issue.

npm install -g npm@latest

@mustela's issue has been solved in danielgtaylor/aglio#54

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants