Ubuntu 12.04にCloud9 IDEをインストールする問題を解決する





以前に、Mac OS XにIDEをインストールする問題について書きました。その後、開発者は大騒ぎし、Cloud9 IDEのインストールプロセスを簡単かつ明確にしました。 しかし、本日、新しいバージョンのIDEをクリーンなシステムにインストールすることにしました。

Node.js 0.8.8の最新バージョンをインストールし 、プロジェクトのメインのGitHubページに記載されている指示に従ってすべての処理を開始しました。 どんなに。







cloud9 ideのインストールに関する私のアクションの進捗





*グローバルにsmマネージャーをインストールしました。

* git clone



を使用してリポジトリをgit clone





*そして、 sm install



コマンドを実行した後、guakeにエラーの説明が表示されました。



コマンドエラーリスト:sm install
  * ERROR *************************************************************************** * Error: NPM error: npm WARN package.json packager@0.1.0 No README.md file found! npm http GET https://registry.npmjs.org/libxml/0.0.6 npm http GET https://registry.npmjs.org/asyncjs npm http 304 https://registry.npmjs.org/asyncjs npm http 304 https://registry.npmjs.org/libxml/0.0.6 > libxml@0.0.6 preinstall /home/cyberlight/.sourcemint/install-cache/https/github.com/ajaxorg/packager/tarball/01597eacd22ad660977d43c44b4001107117b8ea/node_modules/libxml > ./build.sh Checking for program g++ or c++ : /usr/bin/g++ Checking for program cpp : /usr/bin/cpp Checking for program ar : /usr/bin/ar Checking for program ranlib : /usr/bin/ranlib Checking for g++ : ok Checking for node path : not found Checking for node prefix : ok /usr/local 'configure' finished successfully (0.041s) Waf: Entering directory `/home/cyberlight/.sourcemint/install-cache/https/github.com/ajaxorg/packager/tarball/01597eacd22ad660977d43c44b4001107117b8ea/node_modules/libxml/support/o3/build' [1/3] cxx: hosts/node-o3/sh_node.cc -> build/Release/hosts/node-o3/sh_node_1.o 16:35:31 runner system command -> ['/usr/bin/g++', '-g', '-O3', '-msse2', '-ffast-math', '-fPIC', '-DPIC', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_GNU_SOURCE', '-IRelease/include', '-I../include', '-IRelease/hosts', '-I../hosts', '-IRelease/modules', '-I../modules', '-IRelease/deps', '-I../deps', '-I/usr/local/include/node', '../hosts/node-o3/sh_node.cc', '-c', '-o', 'Release/hosts/node-o3/sh_node_1.o'] [2/3] cxx: hosts/node-o3/sh_node_libs.cc -> build/Release/hosts/node-o3/sh_node_libs_1.o 16:35:32 runner system command -> ['/usr/bin/g++', '-g', '-O3', '-msse2', '-ffast-math', '-fPIC', '-DPIC', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_GNU_SOURCE', '-IRelease/include', '-I../include', '-IRelease/hosts', '-I../hosts', '-IRelease/modules', '-I../modules', '-IRelease/deps', '-I../deps', '-I/usr/local/include/node', '../hosts/node-o3/sh_node_libs.cc', '-c', '-o', 'Release/hosts/node-o3/sh_node_libs_1.o'] [3/3] cxx_link: build/Release/hosts/node-o3/sh_node_1.o build/Release/hosts/node-o3/sh_node_libs_1.o -> build/Release/o3.node 16:36:15 runner system command -> ['/usr/bin/g++', 'Release/hosts/node-o3/sh_node_1.o', 'Release/hosts/node-o3/sh_node_libs_1.o', '-o', '/home/cyberlight/.sourcemint/install-cache/https/github.com/ajaxorg/packager/tarball/01597eacd22ad660977d43c44b4001107117b8ea/node_modules/libxml/support/o3/build/Release/o3.node', '-shared', '-L/usr/local/lib', '-Wl,-Bdynamic', '-lxml2'] /usr/bin/ld: cannot find -lxml2 collect2:  ld     1 Waf: Leaving directory `/home/cyberlight/.sourcemint/install-cache/https/github.com/ajaxorg/packager/tarball/01597eacd22ad660977d43c44b4001107117b8ea/node_modules/libxml/support/o3/build' Build failed: -> task failed (err #1): {task: cxx_link sh_node_1.o,sh_node_libs_1.o -> o3.node} File "/usr/local/bin/node-waf", line 16, in <module> Scripting.prepare(t, os.getcwd(), VERSION, wafdir) File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 147, in prepare error(str(e)) cp:    stat  «build/Release/o3.node»:      npm ERR! libxml@0.0.6 preinstall: `./build.sh` npm ERR! `sh "-c" "./build.sh"` failed with 1 npm ERR! npm ERR! Failed at the libxml@0.0.6 preinstall script. npm ERR! This is most likely a problem with the libxml package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! ./build.sh npm ERR! You can get their info via: npm ERR! npm owner ls libxml npm ERR! There is likely additional logging output above. npm ERR! System Linux 3.2.0-29-generic npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "." "--production" npm ERR! cwd /home/cyberlight/.sourcemint/install-cache/https/github.com/ajaxorg/packager/tarball/01597eacd22ad660977d43c44b4001107117b8ea npm ERR! node -v v0.8.8 npm ERR! npm -v 1.1.59 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/cyberlight/.sourcemint/install-cache/https/github.com/ajaxorg/packager/tarball/01597eacd22ad660977d43c44b4001107117b8ea/npm-debug.log npm ERR! not ok code 0 In package: /home/cyberlight/test/cloud9ide/cloud9 * File : false @ false * Stack: * Error: NPM error: npm WARN package.json packager@0.1.0 No README.md file found! * npm http GET https://registry.npmjs.org/libxml/0.0.6 * npm http GET https://registry.npmjs.org/asyncjs * npm http 304 https://registry.npmjs.org/asyncjs * npm http 304 https://registry.npmjs.org/libxml/0.0.6 * * > libxml@0.0.6 preinstall /home/cyberlight/.sourcemint/install-cache/https/github.com/ajaxorg/packager/tarball/01597eacd22ad660977d43c44b4001107117b8ea/node_modules/libxml * > ./build.sh * * Checking for program g++ or c++ : /usr/bin/g++ * Checking for program cpp : /usr/bin/cpp * Checking for program ar : /usr/bin/ar * Checking for program ranlib : /usr/bin/ranlib * Checking for g++ : ok * Checking for node path : not found * Checking for node prefix : ok /usr/local * 'configure' finished successfully (0.041s) * Waf: Entering directory `/home/cyberlight/.sourcemint/install-cache/https/github.com/ajaxorg/packager/tarball/01597eacd22ad660977d43c44b4001107117b8ea/node_modules/libxml/support/o3/build' * [1/3] cxx: hosts/node-o3/sh_node.cc -> build/Release/hosts/node-o3/sh_node_1.o * 16:35:31 runner system command -> ['/usr/bin/g++', '-g', '-O3', '-msse2', '-ffast-math', '-fPIC', '-DPIC', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_GNU_SOURCE', '-IRelease/include', '-I../include', '-IRelease/hosts', '-I../hosts', '-IRelease/modules', '-I../modules', '-IRelease/deps', '-I../deps', '-I/usr/local/include/node', '../hosts/node-o3/sh_node.cc', '-c', '-o', 'Release/hosts/node-o3/sh_node_1.o'] * [2/3] cxx: hosts/node-o3/sh_node_libs.cc -> build/Release/hosts/node-o3/sh_node_libs_1.o * 16:35:32 runner system command -> ['/usr/bin/g++', '-g', '-O3', '-msse2', '-ffast-math', '-fPIC', '-DPIC', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_GNU_SOURCE', '-IRelease/include', '-I../include', '-IRelease/hosts', '-I../hosts', '-IRelease/modules', '-I../modules', '-IRelease/deps', '-I../deps', '-I/usr/local/include/node', '../hosts/node-o3/sh_node_libs.cc', '-c', '-o', 'Release/hosts/node-o3/sh_node_libs_1.o'] * [3/3] cxx_link: build/Release/hosts/node-o3/sh_node_1.o build/Release/hosts/node-o3/sh_node_libs_1.o -> build/Release/o3.node * 16:36:15 runner system command -> ['/usr/bin/g++', 'Release/hosts/node-o3/sh_node_1.o', 'Release/hosts/node-o3/sh_node_libs_1.o', '-o', '/home/cyberlight/.sourcemint/install-cache/https/github.com/ajaxorg/packager/tarball/01597eacd22ad660977d43c44b4001107117b8ea/node_modules/libxml/support/o3/build/Release/o3.node', '-shared', '-L/usr/local/lib', '-Wl,-Bdynamic', '-lxml2'] * /usr/bin/ld: cannot find -lxml2 * collect2:  ld     1 * Waf: Leaving directory `/home/cyberlight/.sourcemint/install-cache/https/github.com/ajaxorg/packager/tarball/01597eacd22ad660977d43c44b4001107117b8ea/node_modules/libxml/support/o3/build' * Build failed: -> task failed (err #1): * {task: cxx_link sh_node_1.o,sh_node_libs_1.o -> o3.node} * File "/usr/local/bin/node-waf", line 16, in <module> * Scripting.prepare(t, os.getcwd(), VERSION, wafdir) * File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 147, in prepare * error(str(e)) * cp:    stat  «build/Release/o3.node»:      * npm ERR! libxml@0.0.6 preinstall: `./build.sh` * npm ERR! `sh "-c" "./build.sh"` failed with 1 * npm ERR! * npm ERR! Failed at the libxml@0.0.6 preinstall script. * npm ERR! This is most likely a problem with the libxml package, * npm ERR! not with npm itself. * npm ERR! Tell the author that this fails on your system: * npm ERR! ./build.sh * npm ERR! You can get their info via: * npm ERR! npm owner ls libxml * npm ERR! There is likely additional logging output above. * * npm ERR! System Linux 3.2.0-29-generic * npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "." "--production" * npm ERR! cwd /home/cyberlight/.sourcemint/install-cache/https/github.com/ajaxorg/packager/tarball/01597eacd22ad660977d43c44b4001107117b8ea * npm ERR! node -v v0.8.8 * npm ERR! npm -v 1.1.59 * npm ERR! code ELIFECYCLE * npm ERR! * npm ERR! Additional logging details can be found in: * npm ERR! /home/cyberlight/.sourcemint/install-cache/https/github.com/ajaxorg/packager/tarball/01597eacd22ad660977d43c44b4001107117b8ea/npm-debug.log * npm ERR! not ok code 0 * In package: /home/cyberlight/test/cloud9ide/cloud9 * at ChildProcess.<anonymous> (/usr/local/lib/node_modules/sm/node_modules/sourcemint-pm-sm/node_modules/sourcemint-pm-npm/lib/npm.js:77:29) * at ChildProcess.EventEmitter.emit (events.js:91:17) * at Process._handle.onexit (child_process.js:674:10) * ERROR ***************************************************************************
      
      









その後、私はインストールがうまくいくのではないかと疑い始めました。



そのため、いくつかのディレクトリが欠落していることが明らかなエラーメッセージを受け取りました。 特に、 build/Release/o3.node



。 そして、過去の経験から、ネイティブのnpmのチームを使用して運を試す必要があると判断しました。 npm install



コマンドを開始すると、 地震コンソールに長いリストが表示され、必要なパッケージのインストールが正常に完了したことが示されました。 つまり npm managerに対する私の希望は正当化されました!



デノウメント





今ではすべてが背後にあり、ideを実行できることに感心し、コンソールでコマンドbin/cloud9.sh



ます! そして、私は失望しました! 再び間違い!



cloud9ideトライアル実行後​​のエラーのリスト
 cyberlight@cyberlight-dt:~/test/cloud9ide/cloud9$ bin/cloud9.sh mkdir -p plugins-client/lib.ace/www/worker rm -rf /tmp/c9_worker_build mkdir -p /tmp/c9_worker_build/ext ln -s `pwd`/plugins-client/ext.language /tmp/c9_worker_build/ext/language ln -s `pwd`/plugins-client/ext.codecomplete /tmp/c9_worker_build/ext/codecomplete ln -s `pwd`/plugins-client/ext.jslanguage /tmp/c9_worker_build/ext/jslanguage node Makefile.dryice.js worker # cloud9 worker --------- path.existsSync is now called `fs.existsSync`. /home/cyberlight/test/cloud9ide/cloud9/node_modules/dryice/lib/dryice/index.js:665 throw new Error('Each commonjs root should be a directory: ' + root); ^ Error: Each commonjs root should be a directory: /home/cyberlight/test/cloud9ide/cloud9/node_modules/treehugger/lib at CommonJsProject.<anonymous> (/home/cyberlight/test/cloud9ide/cloud9/node_modules/dryice/lib/dryice/index.js:665:13) at Array.map (native) at new CommonJsProject (/home/cyberlight/test/cloud9ide/cloud9/node_modules/dryice/lib/dryice/index.js:663:27) at Function.copy.createCommonJsProject (/home/cyberlight/test/cloud9ide/cloud9/node_modules/dryice/lib/dryice/index.js:936:10) at worker (/home/cyberlight/test/cloud9ide/cloud9/Makefile.dryice.js:43:30) at main (/home/cyberlight/test/cloud9ide/cloud9/Makefile.dryice.js:35:9) at Object.<anonymous> (/home/cyberlight/test/cloud9ide/cloud9/Makefile.dryice.js:95:5) at Module._compile (module.js:449:26) at Object.Module._extensions..js (module.js:467:10) at Module.load (module.js:356:32) make: *** [plugins-client/lib.ace/www/worker/worker-language.js]  1 Linux 64 bit path.existsSync is now called `fs.existsSync`. /home/cyberlight/test/cloud9ide/cloud9/node_modules/architect/architect.js:265 throw err; ^ Error: Can't find 'vfs-architect/local' relative to '/home/cyberlight/test/cloud9ide/cloud9/plugins-server' at resolvePackageSync (/home/cyberlight/test/cloud9ide/cloud9/node_modules/architect/architect.js:263:15) at /home/cyberlight/test/cloud9ide/cloud9/node_modules/architect/architect.js:30:34 at Array.forEach (native) at Object.resolveConfig (/home/cyberlight/test/cloud9ide/cloud9/node_modules/architect/architect.js:23:12) at boot (/home/cyberlight/test/cloud9ide/cloud9/server.js:102:33) at Object.<anonymous> (/home/cyberlight/test/cloud9ide/cloud9/server.js:87:2) at Module._compile (module.js:449:26) at Object.Module._extensions..js (module.js:467:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12)
      
      









このリストは、次のvfs-architect



およびtreehugger



パッケージが見つからなかったことを示しています。 Google検索により、このパッケージのGitHub リポジトリリンクが提供されまし 。 クローンは作成しませんでしたが、zipアーカイブとしてダウンロードし、 vfs-architect



という名前でnode_modulesディレクトリに解凍しました。

次に、GitHubのリポジトリからtreehuggerアーカイブもダウンロードしました。 また、treehuggerという名前でtreehugger



ディレクトリに解凍しました。



ステップの後、 bin/cloud9.sh



を使用してideを再度実行しようとしました。 しかし、 socket.io



socket.io



パッケージが存在しないというエラーが画面に表示されます。



cloud9ideの2回目のテスト実行後のエラーリスト
 cyberlight@cyberlight-dt:~/test/cloud9ide/cloud9$ bin/cloud9.sh mkdir -p plugins-client/lib.ace/www/worker rm -rf /tmp/c9_worker_build mkdir -p /tmp/c9_worker_build/ext ln -s `pwd`/plugins-client/ext.language /tmp/c9_worker_build/ext/language ln -s `pwd`/plugins-client/ext.codecomplete /tmp/c9_worker_build/ext/codecomplete ln -s `pwd`/plugins-client/ext.jslanguage /tmp/c9_worker_build/ext/jslanguage node Makefile.dryice.js worker # cloud9 worker --------- path.existsSync is now called `fs.existsSync`. copy.source.commonjs is deprecated, pass { project:... includes:...} directly as a source - ext/language/worker.js has require(...) with non-string parameter. Ignoring requirement. - ext/language/worker.js has require(...) with non-string parameter. Ignoring requirement. cp node_modules/ace/build/src/worker* plugins-client/lib.ace/www/worker Linux 64 bit path.existsSync is now called `fs.existsSync`. module.js:340 throw err; ^ Error: Cannot find module 'socket.io' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:362:17) at require (module.js:378:17) at Object.<anonymous> (/home/cyberlight/test/cloud9ide/cloud9/plugins-server/cloud9.socket/socket.js:5:16) at Module._compile (module.js:449:26) at Object.Module._extensions..js (module.js:467:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:362:17)
      
      









そしてここで、私はどのパッケージを持っているか、どのパッケージを持っていないかをどのように確認できるかを見ることにしました。 smコマンドを見て、 sm status



コマンドを使用してパッケージの存在の診断を実行できることがsm status



た。 実行すると、かなりいいレポートが得られました。











これで、インストール/検索する必要のあるパッケージに気付きました。 そして今、このリストは以下で構成されています:







以下の図では、コマンドによる欠落モジュールに関するデータの出力を強調しました



 sm status
      
      







判明したように、非常に有用なチーム:)











このリストから、 npm managerを使用してpackager, socket.io socket.io-client



インストールできます。 ただし、 vfs



パッケージについては、こちらからクローンを作成するかダウンロードできます 。 アーカイブをダウンロードする場合、同じnode_modulesでアーカイブを解凍する必要があります。



おわりに





npmを使用してpackager packager, socket.io socket.io-client



パッケージをインストールした後packager, socket.io socket.io-client



vfs



忘れないでください。「Urraaaaa!」と叫ぶことができます。bin bin/cloud9.sh



実行した後、サーバーが起動したというメッセージがコンソールに表示されるためです。 同時に、ブラウザは自動的に起動しません。 ideサーバーはポート3131で立ち上がります。 ブラウザを開き、Chromiumを使用してlocalhost:3131



と入力します。



その後:







おわりに





この記事は、Ubuntuにcloud9 ideをインストールする問題に直面している多くの人に役立つと思います。



ご清聴ありがとうございました!



更新する



ドキュメントには次のように記載されていますが:



NodeJS >= 0.6.16 (node 0.8.x will not work at the moment!)







Ideは0.8.8



バージョンでうまく機能します0.8.8





デバッグ、インテリセンス、コマンドラインの機能を確認しました。 これまでのところ、誤動作は見ていません。 何かが発見された場合、この記事の購読を解除します。



私は自分の主張の証拠としてスクリーンショットを入れています。



* Intellisenseは動作します(現在はCtrl + Spaceを使用)







* デバッグ機能







* コマンドラインの対話型ツールチップ










All Articles