热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

安装SublimeText3PackageControlbz2时发生错误-ErrorinstallingSublimeText3PackageControlbz2

MyISPinIndiahasdeciededtoblockGithubforsomereason.IhavebeentryingtoinstallPackageC

My ISP in India has decieded to block Github for some reason.I have been trying to install Package Control for Sublime Text 3 both manually and use the Sublime Text 3 Console.In both of the cases,one dependency seems to be missing:

由于某些原因,我在印度的ISP决定屏蔽Github。我一直在尝试手动安装崇高文本3的包控件,并使用崇高文本3控制台。在这两种情况下,似乎都缺少一种依赖性:

Package Control: Installing 1 missing dependencies
Package Control: Attempting to use Urllib downloader due to WinINet error: Error downloading package. Host not found (errno 12007) during HTTP write phase of downloading https://codeload.github.com/codexns/sublime-bz2/zip/1.0.0.
Package Control: Error downloading package. URL error [Errno 11004] getaddrinfo failed downloading https://codeload.github.com/codexns/sublime-bz2/zip/1.0.0.
error: Package Control

Unable to download bz2. Please view the console for more details.
Package Control: Skipping automatic upgrade, last run at 2015-01-03 11:32:25, next run at 2015-01-03 12:32:25 or after

I have downloaded the Sublime bz2 file manually,what should I do now?

我已经手动下载了崇高的bz2文件,现在该怎么办?

EDIT:

Some skimming through stuff tells me that Package Control 3.0 has dependencies:

一些浏览的内容告诉我包控制3.0有依赖性:

Once the package is extracted, a custom-generated python file is added to a special package named  
0_package_control_loader. For Sublime Text 3, this is a .sublime-package file, whereas for 
Sublime Text 2 it is just a folder. The reason for the name (and creating it as a .sublime-
package file in ST3) is to ensure it is the very first non-default package that Sublime Text 
loads.

Is there a version of 0_package_control_loader.sublime-package that I can add manually(given that I have already installed Package Control with this dependency missing?

是否有一个版本的0_package_control_loader。我可以手动添加的sublime-package(假设我已经安装了包控件,但是缺少这个依赖项)?

7 个解决方案

#1


3  

I've met the same problem as you. Below is the way I resolved it.

我遇到过和你一样的问题。下面是我的解决方法。

  1. Try to get the file "sublime-bz2-1.0.0.zip". (It seems you have done it);
  2. 尝试获取“sublime-bz2-1.0.0.zip”文件。(看来你做过了);
  3. unzip it to the dictory "...\Application Data\Sublime Text 3\Packages\" and rename the sub-dictory name to "bz2".
  4. 把它解压缩到“……”\应用数据\Sublime Text 3\Packages\”将子dictory name重命名为“bz2”。
  5. open a new txt file and paste below code to it

    打开一个新的txt文件并将下面的代码粘贴到它

      {"platforms": ["*"], "url": "https://github.com/codexns/sublime-bz2/issues";, "version": "1.0.0", "description": "Python bz2 module", "sublime_text": "*"}
    
  6. save the file to /bz2 and rename its file name as "dependency-metadata.json" After done these, the hierarchy should be like this:

    将文件保存到/bz2,并将其文件名重新命名为“依赖元数据”。json“完成这些之后,层次结构应该是这样的:

      /Package
      ├─/bz2
      │  ├─/st2_linux_x32
      │  ├─/st2_linux_x64
      │  ├─/st2_windows_x32
      │  ├─/st2_windows_x64
      │  ├─/st3_linux_x32
      │  ├─/st3_linux_x64
      │  ├─/st3_osx_x64
      │  ├─/st3_windows_x32
      │  ├─/st3_windows_x64
      │  └─dependency-metadata.json
      └─/User
          ├─/c2u_tmp
          └─/Package Control.cache
    
  7. restart sublime text3.

    重启崇高text3。

Hope it helps!

希望它可以帮助!

Regards

问候

#2


3  

This worked for me, see: @godzig's answer, on this related Github issue: issues/989. The gist of it being:

这对我很有用,见:@godzig的答案,关于这个相关的Github问题:issues/989。它的要点是:

  • open the 0_package_control_loader.sublime-package archive, in Installed Packages, of your SBT3 folder. Change the filename from 02-bz2.py to 01-bz2.py, and the error is gone; at least in my case anyway.
  • 0 _package_control_loader开放。sublime-package archive, in Installed Packages, in your SBT3文件夹。从02-bz2更改文件名。py 01-bz2。py,错误消失了;至少对我来说是这样。

HTH

HTH

#3


0  

Until your ISP unblocks Github (who does that?), you can download 0_package_control_loader.sublime-package here. I don't know if there are differences in the package for different versions of Windows, but this is from ST3 on Win8. Hope it helps!

在ISP打开Github(谁会这样做?)之前,您可以下载0_package_control_loader。sublime-package这里。我不知道不同版本的Windows是否有不同的包,但这是Win8上的ST3。希望它可以帮助!

#4


0  

Machael Lv's answer didn't help for me. Then i just started sublime text as administrator for one time and problem dissapeared - now i can run sbt as ussual and error message doesn't appear again.

吕布的回答对我没有帮助。然后我以管理员的身份开始了崇高的文本,问题消失了——现在我可以运行sbt,因为ussual和错误消息不会再次出现。

#5


0  

I got the same problem and I try and fix it by use manual installation like this: Manual

我也遇到了同样的问题,我试着用手工安装来解决,就像这样:手工安装

If for some reason the console installation instructions do not work for you (such as having a proxy on your network), perform the following steps to manually install Package Control:

如果由于某种原因控制台安装说明不适合您(例如在您的网络上有一个代理),执行以下步骤手动安装包控制:

  1. Click the Preferences > Browse Packages… menu
  2. 单击Preferences >浏览包……菜单。
  3. Browse up a folder and then into the Installed Packages/ folder
  4. 浏览一个文件夹,然后进入已安装的包/文件夹。
  5. Download Package Control.sublime-package and copy it into the Installed Packages/ directory
  6. 下载包的控制。sublime-package并将它复制到已安装的package /目录中
  7. Restart Sublime Text
  8. 重启的文本

#6


0  

I got the same problem and I try and fix it by use manual installation like this: Manual

我也遇到了同样的问题,我试着用手工安装来解决,就像这样:手工安装

If for some reason the console installation instructions do not work for you (such as having a proxy on your network), perform the following steps to manually install Package Control:

如果由于某种原因控制台安装说明不适合您(例如在您的网络上有一个代理),执行以下步骤手动安装包控制:

  1. Click the Preferences > Browse Packages… menu
  2. 单击Preferences >浏览包……菜单。
  3. Browse up a folder and then into the Installed Packages/ folder
  4. 浏览一个文件夹,然后进入已安装的包/文件夹。
  5. Download Package Control.sublime-package and copy it into the Installed Packages/ directory
  6. 下载包的控制。sublime-package并将它复制到已安装的package /目录中
  7. Restart Sublime Text
  8. 重启的文本

#7


-2  

import urllib.request,os,hashlib;   
h = '2deb499853c4371624f5a07e27c334aa' + 'bf8c4e67d14fb0525ba4f89698a6d7e1';  
pf = 'Package Control.sublime-package';  
ipp = sublime.installed_packages_path();  
urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) );  
by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read();  
dh = hashlib.sha256(by).hexdigest();  
print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) 
if dh != h 
else open(os.path.join( ipp, pf), 'wb' ).write(by) 

推荐阅读
author-avatar
兜妈是我
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有