Error installing Sublime Text 3 Package Control bz2
Asked Answered
W

6

8

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?

Whitmore answered 3/1, 2015 at 6:15 Comment(3)
Github and many other websites like vimeo, Dailymotion etc. have been unblocked since 2 days. I just tried the URL in your error message and I get the download. You should first do the same. If Github is still blocked, contact your ISP and let them know of situation. Also, just to clarify, you have already installed Package Control?Moppet
@HarshGupta This is the first install of Package Control on the editor,Package Control(visible in preference menu,will load packages but not install them) got installed but I cannot do anything with it because it is missing a dependency.Whitmore
For install dependency bz2 for Sublime Text 2 i use "downloader_precedence": { "linux": ["curl"] }, add this line to /.config/sublime-text-2/Packages/User/Package\ Control.sublime-settingsBurro
P
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. 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

Papillary answered 27/2, 2015 at 9:48 Comment(1)
not working for me, still seeing An error occurred while trying to parse the package metadata for bz2., sorrySpite
S
3

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

Spite answered 24/10, 2015 at 13:25 Comment(0)
R
1

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
Raven answered 11/12, 2015 at 9:21 Comment(0)
C
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!

Chaetognath answered 5/1, 2015 at 19:18 Comment(3)
0_package_control_loader.sublime-package is dynamically generated on each machine to contain loaders for each installed dependency. It won't work to share it.Whet
@Whet thanks Will, I didn't know that. Sharing the file was just a stop-gap until the OP could access github again, and since he never wrote back I don't know if it worked or not.Chaetognath
No worries, I just figured I'd mention that so people in the future don't try it.Whet
B
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.

Bahrain answered 15/9, 2015 at 8:18 Comment(0)
T
-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) 
Tosh answered 3/1, 2015 at 6:20 Comment(3)
pasted the code you gave me in the Sublime Text 3 console,it stills throws the error.could you format the code using the {} formatting option and elaborateWhitmore
went to the website and copied line by line,this is not workingWhitmore
This is an old version of the install script, it won't work anymore since a newer version of Package Control was released with a different hash. There is even a bright orange warning message on the installation page that says not to copy and paste the installation code.Whet

© 2022 - 2024 — McMap. All rights reserved.