tiger115136 / opencc

Automatically exported from code.google.com/p/opencc
0 stars 0 forks source link

Nodejs安装opencc总是不成功,不知道是什么问题。 #36

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Traceback (most recent call last):
  File "/usr/local/lib/node_modules/node-gyp/gyp/gyp", line 18, in <module>
    sys.exit(gyp.main(sys.argv[1:]))
  File "/usr/lib/pymodules/python2.7/gyp/__init__.py", line 471, in main
    options.circular_check)
  File "/usr/lib/pymodules/python2.7/gyp/__init__.py", line 111, in Load
    depth, generator_input_info, check, circular_check)
  File "/usr/lib/pymodules/python2.7/gyp/input.py", line 2378, in Load
    depth, check)
  File "/usr/lib/pymodules/python2.7/gyp/input.py", line 358, in LoadTargetBuildFile
    includes, True, check)
  File "/usr/lib/pymodules/python2.7/gyp/input.py", line 208, in LoadOneBuildFile
    raise Exception("%s not found (cwd: %s)" % (build_file_path, os.getcwd()))
Exception: binding.gyp not found (cwd: /home/ubuntu/webot-douban-event) 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/local/lib/node_modules/node-gyp/lib/configure.js:424: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.8.0-19-generic
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/ubuntu/webot-douban-event
gyp ERR! node -v v0.10.4
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok

还了很多个nodejs版本也不行。

Original issue reported on code.google.com by noodleb...@gmail.com on 5 Aug 2013 at 8:49

GoogleCodeExporter commented 8 years ago
請你嘗試從github獲取代碼,並使用cmake編譯,看看是否還有問
題。

Original comment by byvo...@gmail.com on 5 Aug 2013 at 9:20

GoogleCodeExporter commented 8 years ago
您好,cmake错误提示:
ubuntu@ip-172-31-46-25:~/webot-douban-event/node_modules/opencc/build$ make
[ 78%] Built target libopencc
[ 78%] Built target libopencc_static
[ 78%] Built target opencc_dict
[ 78%] Building simp_to_trad_phrases.ocd
Killed
make[2]: *** [data/simp_to_trad_phrases.ocd] Error 137
make[1]: *** [data/CMakeFiles/ocds.dir/all] Error 2
make: *** [all] Error 2

只有ubuntu自带源能够安装,但是我需要部署nodejs应用,安装��
�上opencc会很麻烦,有什么办法解决么?

Original comment by noodleb...@gmail.com on 5 Aug 2013 at 9:31

GoogleCodeExporter commented 8 years ago
根據你的錯誤信息,可能是內存不足導致,你是否在資源十��
�受限的虛擬機上編譯?如果是,可以考慮在資源豐富的計算�
��上編譯,然後複製上去。

Original comment by byvo...@gmail.com on 5 Aug 2013 at 10:09

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
非常感谢您不厌其烦的帮我解答,我在配置豆瓣同城微信公��
�平台代码,有没有什么办法解决npm install opencc 
安装不上的问题呢?

Original comment by noodleb...@gmail.com on 6 Aug 2013 at 4:31

GoogleCodeExporter commented 8 years ago
不要在虛擬機上 npm install opencc 
,在你的計算機上運行,然後把node_modules裏面的opencc目錄複��
�到虛擬機的相同目錄中。

Original comment by byvo...@gmail.com on 6 Aug 2013 at 8:36