2

node-gyp を使用する atom パッケージをインストールしようとしています。しかし、毎回クラッシュします。

apm の出力は次のとおりです。

Installing autocomplete-clang to /home/lars/.atom/packages ✗

> runas@1.0.1 install /tmp/apm-install-dir-11499-22706-1lgjxbx/node_modules/autocomplete-clang/node_modules/clang-flags/node_modules/pathwatcher/node_modules/runas
> node-gyp rebuild


> runas@0.5.4 install /tmp/apm-install-dir-11499-22706-1lgjxbx/node_modules/autocomplete-clang/node_modules/snippets/node_modules/pathwatcher/node_modules/runas
> node-gyp rebuild


npm http GET https://registry.npmjs.org/underscore-plus
npm http GET https://registry.npmjs.org/clang-flags
npm http 304 https://registry.npmjs.org/underscore-plus
npm http 304 https://registry.npmjs.org/clang-flags
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/pathwatcher
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/emissary
npm http GET https://registry.npmjs.org/loophole
npm http GET https://registry.npmjs.org/fs-plus
npm http GET https://registry.npmjs.org/pathwatcher
npm http GET https://registry.npmjs.org/pegjs
npm http GET https://registry.npmjs.org/season
npm http GET https://registry.npmjs.org/temp
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/fs-plus
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/pegjs
npm http 304 https://registry.npmjs.org/season
npm http 304 https://registry.npmjs.org/pathwatcher
npm http 304 https://registry.npmjs.org/pathwatcher
npm http GET https://registry.npmjs.org/emissary
npm http GET https://registry.npmjs.org/event-kit
npm http 304 https://registry.npmjs.org/temp
npm http GET https://registry.npmjs.org/nan/1.2.0
npm http GET https://registry.npmjs.org/grim
npm http GET https://registry.npmjs.org/q
npm http GET https://registry.npmjs.org/runas
npm http 304 https://registry.npmjs.org/emissary
npm http 304 https://registry.npmjs.org/emissary
npm http 304 https://registry.npmjs.org/nan/1.2.0
npm http 304 https://registry.npmjs.org/q
npm http 304 https://registry.npmjs.org/runas
npm http 304 https://registry.npmjs.org/grim
npm http 304 https://registry.npmjs.org/event-kit
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/rimraf
gyp ERR! configure error 
gyp ERR! stack Error: EACCES, mkdir '/tmp/apm-install-dir-11499-22706-1lgjxbx/node_modules/autocomplete-clang/node_modules/clang-flags/node_modules/pathwatcher/node_modules/runas/build'
gyp ERR! System Linux 3.13.0-36-generic
gyp ERR! command "node" "/usr/local/share/atom/resources/app/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/apm-install-dir-11499-22706-1lgjxbx/node_modules/autocomplete-clang/node_modules/clang-flags/node_modules/pathwatcher/node_modules/runas
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm http GET https://registry.npmjs.org/mixto
npm http GET https://registry.npmjs.org/property-accessors
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/loophole
npm ERR! runas@1.0.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the runas@1.0.1 install script.
npm ERR! This is most likely a problem with the runas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls runas
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.13.0-36-generic
npm ERR! command "/usr/local/share/atom/resources/app/apm/node_modules/atom-package-manager/bin/node" "/usr/local/share/atom/resources/app/apm/node_modules/atom-package-manager/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/usr/local/share/atom/resources/app/apm/node_modules/atom-package-manager/.apmrc" "--userconfig" "/home/lars/.atom/.apmrc" "install" "/home/lars/.atom/.node-gyp/.atom/.apm/autocomplete-clang/0.2.0/package.tgz" "--target=0.11.10" "--arch=x64"
npm ERR! cwd /tmp/apm-install-dir-11499-22706-1lgjxbx
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.4
npm ERR! code ELIFECYCLE
npm http 304 https://registry.npmjs.org/property-accessors
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/osenv/0.0.3
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/nan/0.8.0
npm http 304 https://registry.npmjs.org/osenv/0.0.3
npm http GET https://registry.npmjs.org/graceful-fs
npm http 200 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/nan/0.8.0
gyp ERR! configure error 
gyp ERR! stack Error: EACCES, mkdir '/tmp/apm-install-dir-11499-22706-1lgjxbx/node_modules/autocomplete-clang/node_modules/snippets/node_modules/pathwatcher/node_modules/runas/build'
gyp ERR! System Linux 3.13.0-36-generic
gyp ERR! command "node" "/usr/local/share/atom/resources/app/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/apm-install-dir-11499-22706-1lgjxbx/node_modules/autocomplete-clang/node_modules/snippets/node_modules/pathwatcher/node_modules/runas
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/mixto
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /tmp/apm-install-dir-11499-22706-1lgjxbx/npm-debug.log
npm ERR! not ok code 0

この問題、または同様の動作を説明するオンラインの投稿がたくさんあります。どうやら node-gyp には多少問題があります。

当初、私のpythonバージョンは2.7でした。これは私がしたことです:

  1. atom と nodejs を削除し、それぞれの最新バージョン (ソースからの nodejs) を再インストールしました。エラーはまだあります
  2. node-gyp と runas を npm でインストールしました。エラーはまだあります。
  3. すべてを削除し、chris-lea ppa からインストールしました。エラーが続く
  4. すべてを削除し、deadsnakes ppa を追加し、python を古い 2.6 バージョンに設定し、ターミナルの python コマンドでどのバージョンが実行されているかを確認しました - その 2.6. 次に、ソースからnodejsを再インストールしました。npm config で python パスを 2.6 に設定します。そしてnode-gypを再インストールしました。エラーはまだあります。
  5. 古いpythonセットアップを除いて、すべてを削除しました。そして、chris-lea ppaからnodejsをインストールしました。同じ問題。
  6. ~/.atom/.node-gyp/ を削除し、npm で再インストールしました

各ステップの間に、npm キャッシュ クリーンを実行し、atom の最新バージョンを再インストールしました。

私のatomパッケージディレクトリでのnode-gypの再構築は毎回失敗します。autocomplete-clang パッケージをインストールできません。同じエラー。エラー メッセージは、runas に問題があることを示唆しています。したがって、各ステップで、npm 経由で runas もインストールしました。

これには本当に多くの時間が費やされており、私はすべてアイデアがありません。

アップデート:

アトムの最新バージョンでは、エラーを再現できませんでした

4

2 に答える 2

1

アトムの最新バージョンでは、このエラーを再現できませんでした。

于 2014-11-16T11:51:53.423 に答える
0

apmMac では、インストールされている場所 (私のマシンでは MacOSX Sierra: /Applications/Atom.app/Contents/Resources/app/apm/bin)を見つけて./apm config set python /usr/bin/python2.7、そのフォルダーで: を実行することで、この問題を解決しました。このコマンドは、apmatom でインストールされたプログラムの python 構成を設定し、グローバル ノードのセットアップを台無しにしません。または、コピー/貼り付けの便宜のために:

cd /Applications/Atom.app/Contents/Resources/app/apm/bin
./apm config set python /usr/bin/python2.7
于 2017-03-01T15:58:35.157 に答える