[DONE]pomelo npm-install 出现 AttributeError: 'module' object has no attribute 'script_main'
2014-02-21 23:09
441 查看
环境:Mac 10.7.4, python 2.6.7, nodejs 0.10.26, pomelo 0.8.9
下载 chatofpomelo, 执行 sudo sh npm-install.sh 的时候,出现如下错误
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 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)
移动到某个文件夹
2)
确保python不能找到它
3)
再次执行
4)
能正常启动game-server
参考:
https://github.com/TooTallNate/node-gyp/issues/363
下载 chatofpomelo, 执行 sudo sh npm-install.sh 的时候,出现如下错误
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 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 "<string>", line 1, in <module> ImportError: No module named gyp
再次执行
4)
$ sudo sh npm-install.sh
能正常启动game-server
参考:
https://github.com/TooTallNate/node-gyp/issues/363
相关文章推荐
- AttributeError: 'module' object has no attribute 'AF_INET' 错误的原因
- AttributeError: 'module' object has no attribute 'xxx'
- 解决AttributeError: 'module' object has no attribute 'IPV4ONLY' 的问题
- attributeError:'module' object has no attribute ** 解决办法
- AttributeError: 'module' object has no attribute 'RAND_LIMIT'
- AttributeError: 'module' object has no attribute 'Thread'
- AttributeError: 'module' object has no attribute 'Thread'
- AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'
- python 中出现的AttributeError: 'module' object has no attribute '_handlerList'
- 提示AttributeError: 'module' object has no attribute 'HTTPSHandler'解决方法
- AttributeError: 'str' object has no attribute 'copy'
- 使用vectorizer.fit_transform时出现AttributeError: 'file' object has no attribute 'lower'
- pylons 1.0 AttributeError: 'ContextObj' object has no attribute "xxx"
- Python3.4 pandas 在IDLE出现AttributeError: 'NoneType' object has no attribute 'fileno'
- yum--AttributeError: 'module' object has no attribute 'HTTPSHandler'
- AttributeError: 'WebDriver' object has no attribute 'switchTo'
- Flask 上的 AttributeError: 'bool' object has no attribute '__call__'问题
- AttributeError: 'JNIFromJavaP' object has no attribute 'fully_qualified_class'
- AttributeError: 'int' object has no attribute 'log'
- AttributeError: 'dict_values' object has no attribute 'translate'