我一直无法安装 Atom,无论是哪个版本,使用哪种方法。我尝试通过 Ubuntu 软件启动来安装 Atom,但失败了。按钮变为显示进度条,然后立即返回到“安装”。我尝试了多个版本的安装包,从最新版本开始,一直到大约 5 或 6 个版本。我还尝试过从源代码构建,但这也不起作用。我按照安装说明进行操作并设置好一切,但当我运行“script/build”命令时,我得到了以下信息:
XXXXX@XXXXX-XXXXX:~/atom$ sudo script/build
[sudo] password for XXXXX:
Node: v6.11.2
Npm: v5.3.0
Installing script dependencies
Installing apm
npm ERR! path /home/XXXXX/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/ansicolors
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/home/XXXXX/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/ansicolors' -> '/home/XXXXX/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/.ansicolors.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/XXXXX/.npm/_logs/2017-09-05T16_27_02_383Z-debug.log
child_process.js:495
throw err;
^
Error: Command failed: /home/XXXXX/atom/script/node_modules/.bin/npm --global-style --loglevel=error install
npm ERR! path /home/XXXXX/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/ansicolors
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/home/XXXXX/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/ansicolors' -> '/home/XXXXX/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/.ansicolors.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/XXXXX/.npm/_logs/2017-09-05T16_27_02_383Z-debug.log
at checkExecSyncError (child_process.js:472:13)
at Object.execFileSync (child_process.js:492:13)
at module.exports (/home/XXXXX/atom/script/lib/install-apm.js:9:16)
at Object.<anonymous> (/home/XXXXX/atom/script/bootstrap:29:1)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
我检查了 github 页面,看看是否有我遗漏的文件夹,但 github 上的“apm”文件夹中只有 2 个文件,没有文件夹。我不知道接下来该去哪里。
答案1
我在尝试为 32 位 Ubuntu 版本构建 Atom 时遇到了保存问题。幸运的是,你可以通过 PPA 安装 Atom:
sudo add-apt-repository ppa:webupd8team/atom
sudo apt-get update
sudo apt-get install atom
来源:在 32 位 Ubuntu 上安装 Atom 文本编辑器
另外,你可以在这里通过 PPA 检查当前可供安装的版本(感谢老年怪人):https://www.ubuntuupdates.org/ppa/atom