Linux Mint 17ソースからAtomをビルドしようとしたときにインストールエラーが発生しました。

Linux Mint 17ソースからAtomをビルドしようとしたときにインストールエラーが発生しました。

Linux Mint 17.3のソースからAtomをビルドしようとしましたが、ビルドプロセスはほぼ完了しました。私はこのチュートリアルに従っています:https://www.tecmint.com/atom-text-and-source-code-editor-for-linux/エラーのヘルプについては、別のページをご覧ください。

次のコマンドを実行しましたsudo script/build --create-debian-package --install。これら2つのオプションなしでコマンドを実行すると、ビルドが正しく機能しているように見え、出力の最後にこれら2つのオプションを追加してソフトウェアをインストールするように求められます。ただし、これら2つのオプションを使用すると、次のエラーが発生します。

Installing modules ✗
> [email protected] install /home/akaash/Git/atom/node_modules/github/node_modules/leveldown
> prebuild-install || node-gyp rebuild


prebuild-install WARN install EACCES: permission denied, mkdir '/home/akaash/Git/atom/node_modules/github/node_modules/leveldown/build'
gyp info it worked if it ends with ok
gyp verb cli [ '/home/akaash/Git/atom/apm/node_modules/atom-package-manager/bin/node',
gyp verb cli   '/home/akaash/Git/atom/apm/node_modules/atom-package-manager/node_modules/.bin/node-gyp',
gyp verb cli   'rebuild' ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "/home/akaash/Git/atom/apm/node_modules/atom-package-manager/bin/python-interceptor.sh" in the PATH
gyp verb `which` succeeded /home/akaash/Git/atom/apm/node_modules/atom-package-manager/bin/python-interceptor.sh /home/akaash/Git/atom/apm/node_modules/atom-package-manager/bin/python-interceptor.sh
gyp verb check python version `/home/akaash/Git/atom/apm/node_modules/atom-package-manager/bin/python-interceptor.sh -c "import platform; print(platform.python_version());"` returned: "2.7.6\n"
gyp verb get node dir compiling against --target node version: 2.0.18
gyp verb command install [ '2.0.18' ]
gyp verb install input version string "2.0.18"
gyp verb install installing version: iojs-2.0.18
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: iojs-2.0.18
gyp verb build dir attempting to create "build" dir: /home/akaash/Git/atom/node_modules/github/node_modules/leveldown/build
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/akaash/Git/atom/node_modules/github/node_modules/leveldown/build'
gyp ERR! System Linux 3.19.0-32-generic
gyp ERR! command "/home/akaash/Git/atom/apm/node_modules/atom-package-manager/bin/node" "/home/akaash/Git/atom/apm/node_modules/atom-package-manager/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /home/akaash/Git/atom/node_modules/github/node_modules/leveldown
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/akaash/.atom/.apm/_logs/2019-03-29T10_14_30_223Z-debug.log
child_process.js:630
    throw err;
    ^

Error: Command failed: /home/akaash/Git/atom/apm/node_modules/atom-package-manager/bin/apm --loglevel=error install
  at checkExecSyncError (child_process.js:607:13)
  at Object.execFileSync (child_process.js:627:13)
  at module.exports (/home/akaash/Git/atom/script/lib/run-apm-install.js:14:16)
  at module.exports (/home/akaash/Git/atom/script/lib/transpile-packages-with-custom-transpiler-paths.js:30:7)
  at Object.<anonymous> (/home/akaash/Git/atom/script/build:68:3)
  at Module._compile (module.js:653:30)
  at Object.Module._extensions..js (module.js:664:10)
  at Module.load (module.js:566:32)
  at tryModuleLoad (module.js:506:12)
  at Function.Module._load (module.js:498:3)
  at Function.Module.runMain (module.js:694:10)
  at startup (bootstrap_node.js:204:16)
  at bootstrap_node.js:625:3

ログを見ると、ファイルの終わりは上記の出力の終わりと同じnpmエラーです。しかし、ほとんどの内容が何を意味するのか分かりません。

この問題を解決し、Atomを正しくインストールするにはどうすればよいですか?

編集する:

「許可拒否」エラーがあることを知っているがsudo。でもそうではなくて、ずっと調べてみようと努力しています。

ベストアンサー1

私はこの問題に対する解決策を見つけたと思います。いくつかの修正方法を試しましたが、何も機能しなかったため逃げましsudo chown -R akaash:akaash ~/Git/atomscript/build --create-debian-package --compress-artifacts --install --unsafe-perm=true --allow-root --global leveldown

私はこのchownコマンドですsudo

その間に、次のウェブサイトを発見しました。

https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally

これにより、次のことが行われます。

https://github.com/creationix/nvm

ノードインストーラの代わりにノードバージョンマネージャを使用してnpmを更新する方法について説明します。

私はnpmを更新することを知っていますが、役に立つかもしれませんし、そうでないかもしれません。しかし、私が試したすべての方法を組み合わせて、最終的にこのエラーを削除しました。

おすすめ記事