node-fibers: Cannot install fibers on node 4.0.0
This is the message I got:
$ nvm use node 4
Now using node v4.0.0 (npm v2.14.2)
$ npm install fibers
\
> fibers@1.0.7 install /Users/jchen/node_modules/fibers
> node build.js || nodejs build.js
CXX(target) Release/obj.target/fibers/src/fibers.o
CXX(target) Release/obj.target/fibers/src/coroutine.o
CC(target) Release/obj.target/fibers/src/libcoro/coro.o
SOLINK_MODULE(target) Release/fibers.node
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/fibers.node] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/jchen/.nvm/versions/node/v4.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/Users/jchen/.nvm/versions/node/v4.0.0/bin/node" "/Users/jchen/.nvm/versions/node/v4.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /Users/jchen/node_modules/fibers
gyp ERR! node -v v4.0.0
gyp ERR! node-gyp -v v3.0.1
gyp ERR! not ok
Build failed
sh: nodejs: command not found
npm ERR! Darwin 14.5.0
npm ERR! argv "/Users/jchen/.nvm/versions/node/v4.0.0/bin/node" "/Users/jchen/.nvm/versions/node/v4.0.0/bin/npm" "install" "fibers"
npm ERR! node v4.0.0
npm ERR! npm v2.14.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! fibers@1.0.7 install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the fibers@1.0.7 install script 'node build.js || nodejs build.js'.
npm ERR! This is most likely a problem with the fibers package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build.js || nodejs build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls fibers
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/jchen/npm-debug.log
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 48 (15 by maintainers)
Figured out my issue. On centos 6, I needed a version of gcc newer than 4.4.7. To upgrade to 4.7.2:
Then add this to your user profile (mine was ~/.bash_profile):
PATH=/opt/centos/devtoolset-1.1/root/usr/bin/:$PATHHere are all the steps I take to install our centos dev machines before installing node (now via nvm):