Atom 无法在 Ubuntu 上安装任何软件包(错误代码 ELIFECYCLE)

Atom 无法在 Ubuntu 上安装任何软件包(错误代码 ELIFECYCLE)

今天,Atom 突然无法安装任何软件包。以前它运行良好,我已经安装了一些软件包。但现在它失败了Exit status 134。无论我尝试安装什么软件包,都会发生这种情况。我尝试了 Hydrogen 和 Atom Beautify,

我尝试了 Atom 设置的 GUI 以及apm install ...(带和不带 sudo)。

这是堆栈跟踪:

> [email protected] postinstall /tmp/apm-install-dir-120129-5590-622axg.s39i7/node_modules/atom-beautify/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated [email protected]: No longer maintained. We recomment migrating to ESLint with eslint-config-wikimedia.
npm WARN deprecated [email protected]: Package no longer supported. Contact [email protected] for more info.
npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
Aborted (core dumped)
npm WARN enoent ENOENT: no such file or directory, open '/tmp/apm-install-dir-120129-5590-622axg.s39i7/package.json'
npm WARN apm-install-dir-120129-5590-622axg.s39i7 No description
npm WARN apm-install-dir-120129-5590-622axg.s39i7 No repository field.
npm WARN apm-install-dir-120129-5590-622axg.s39i7 No README data
npm WARN apm-install-dir-120129-5590-622axg.s39i7 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
npm ERR! Exit status 134
npm ERR! 
npm ERR! Failed at the [email protected] postinstall 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!     /root/.atom/.apm/_logs/2020-02-29T09_58_40_245Z-debug.log

日志文件的最后几行有相同的堆栈。

我怀疑的一件事是,我最近为一个 Angular 项目安装了它NodeJSnpm这会导致问题吗?

我在 Pop!_OS ( Ubuntu)上19.10,使用npm 6.13.6Node v10.15.2
点击后atom -v得到以下结果(请注意 Node 版本与上面的版本之间的差异):
Atom : 1.43.0 Electron: 4.2.7 Chrome : 69.0.3497.128 Node : 10.11.0


更新: apm install language-vue成功了,但apm install atom-beautify仍然apm install hydrogen失败。不知道这里出了什么问题。

任何建议都很好。提前谢谢。:)

答案1

我在 Debian 10 上使用 atom-id-ui 时遇到了同样的问题。我手动安装了 node.js 12 来修复它。

尝试添加存储库并安装 node.js

# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs

# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs

希望这能帮到你。

问候。

相关内容