Atom安装插件报错

新装的Atom直接install报错如下:

Installing “sync-settings@0.7.2” failed.Hide output…
��Ϣ: ���ṩ��ģʽ�޷��ҵ��ļ���


gyp info it worked if it ends with ok
gyp info using node-gyp@3.4.0
gyp info using node@4.4.5 | win32 | ia32
gyp http GET https://atom.io/download/atom-shell/v0.37.8/node-v0.37.8.tar.gz
gyp http 200 https://atom.io/download/atom-shell/v0.37.8/node-v0.37.8.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! install error 
gyp ERR! stack Error: incorrect header check
gyp ERR! stack     at Zlib._handle.onerror (zlib.js:363:17)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Users\\1\\AppData\\Local\\atom\\app-1.10.2\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\1\\AppData\\Local\\atom\\app-1.10.2\\resources\\app\\apm\\node_modules\\node-gyp\\bin\\node-gyp.js" "install" "--runtime=electron" "--target=0.37.8" "--dist-url=https://atom.io/download/atom-shell" "--arch=ia32" "--ensure"
gyp ERR! cwd C:\Users\1\.atom
gyp ERR! node -v v4.4.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 

Compiler tools not found
Packages that depend on modules that contain C/C++ code will fail to install.
Read here for instructions on installing Python and Visual Studio.
Run apm install --check after installing to test compiling a native module.

请问这是什么原因?
不胜感激。

阅读 12.1k
3 个回答

报错里有一句 stack Error: incorrect header check,似乎是这个问题。
题主可以手动试一下那个压缩包下载以及解压是否正常。

报错内容是:
锟斤拷息: 锟斤拷锟结供锟斤拷模式锟睫凤拷锟揭碉拷锟侥硷拷锟斤拷

锟斤拷

不知道题主是需要安装什么插件,python相关或C、C++相关?
某些插件在仅有atom的node环境时是无法正常工作的,还需要系统上的其他运行环境。

另外由于atom的插件是放在atom.io上的,其实就是github上,这个网站在内地的连接稳定性你懂的。所以建议fq。

atom的插件安装建议使用apm,而不是GUI界面的setting。
比如你的Atom安装在 D:Atom 下,则 apmD:Atomresourcesappapmbin 中,在这个目录下运行如:

apm install linter

这样出错之后报错信息会全一些,更方便定位问题。


追加:
图片描述

看起来不需要依赖,那只能猜测是网络问题了。

新手上路,请多包涵

这问题我前不久刚碰到,是墙的问题,后来在https://github.com/atom/apm/i...这儿找到答案

具体解决办法就是在命令行下执行这个指令

"C:\\Users\\1\\AppData\\Local\\atom\\app-1.10.2\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\1\\AppData\\Local\\atom\\app-1.10.2\\resources\\app\\apm\\node_modules\\node-gyp\\bin\\node-gyp.js" "install" "--runtime=electron" "--target=0.37.8" "--dist-url=https://atom.io/download/atom-shell" "--arch=ia32" "--ensure" "--verbose" "--proxy=http://proxy:80"

这个命令的前面一大串就是你的错误信息中gyp ERR! command这一行,在行尾加上"--verbose" "--proxy=http://127.0.0.1:8087"就是你需要的指令。我在自己电脑上用xx-net翻墙,代理地址是http://127.0.0.1:8087,你需要把--proxy后面的参数改成你自己的代理地址。

这个办法的前提是要翻墙,还没翻墙的话建议用xx-net翻墙,免费的

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题