vamsiampolu
vamsiampolu

Reputation: 6622

Error installing Sublime Text 3 Package Control bz2

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:

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?

EDIT:

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

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?

Upvotes: 8

Views: 27918

Answers (6)

SaintKnight
SaintKnight

Reputation: 72

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. Browse up a folder and then into the Installed Packages/ folder
  3. Download Package Control.sublime-package and copy it into the Installed Packages/ directory
  4. Restart Sublime Text

Upvotes: 1

Florin
Florin

Reputation: 528

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

  • 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.

HTH

Upvotes: 3

porfirion
porfirion

Reputation: 1699

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.

Upvotes: 0

Machael Lv
Machael Lv

Reputation: 31

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. unzip it to the dictory "...\Application Data\Sublime Text 3\Packages\" and rename the sub-dictory name to "bz2".
  3. open a new txt file and paste below code to it

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

      /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
    
  5. restart sublime text3.

Hope it helps!

Regards

Upvotes: 3

manish kumar
manish kumar

Reputation: 31

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) 

Upvotes: -2

MattDMo
MattDMo

Reputation: 102852

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!

Upvotes: 0

Related Questions