Chinaunix首页 | 论坛 | 博客
  • 博客访问: 83934
  • 博文数量: 11
  • 博客积分: 187
  • 博客等级: 入伍新兵
  • 技术积分: 136
  • 用 户 组: 普通用户
  • 注册时间: 2012-02-29 10:43
文章分类

全部博文(11)

文章存档

2016年(4)

2014年(1)

2012年(6)

我的朋友

分类: JavaScript

2014-05-08 10:43:09

Traceback (most recent call last):
File "/usr/local/lib/node_modules/npm/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/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 Darwin 11.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Tom/Desktop/bitbucket/pd/server/game-server/node_modules/pomelo/node_modules/pomelo-rpc/node_modules/toobusy
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok

在google后找到解决方法:因为本地的gyp module引起

1) $ python -c 'import gyp; print gyp.__file__'

/usr/lib/python2.6/site-packages/gyp/__init__.pyc 

移动到某个文件夹
2) $ mv /usr/lib/python2.6/site-packages/gyp /usr/lib/python2.6/site-packages/gyp_backup

确保python不能找到它
3) $ python -c 'import gyp; print gyp.__file__'

Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named gyp 

再次执行
4) $ sudo sh npm-install.sh


Error: Could not load the bindings file


此问题 只要 npm rebuild 即可解决

阅读(1948) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~