Sublime2 Package Control不可用修复

  因为教程里用的是sublime2 所以就跟着用了,也没换3,但是最近安装Nodejs做配置时,发现插件安装器不能用了,已点安装就弹窗报错:

there are no packages available for installation。

控制台报错:

Package Control: Error downloading channel. HTTP exception InvalidCertificateException (Host sublime.wbond.net returned an invalid certificate (_ssl.c:480: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed)
) downloading https://sublime.wbond.net/repositories.json.
error: Package Control: There are no packages available for installation.

然后就开始尝试各种方法,你也可以试试那些该hosts文件什么的方法,如果不行再在控制台输入下面的代码回车:

import urllib2,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')

反正我这边是可以正常用了,再者如果你是sublime3,就去Git上下载重装Package Control吧,好像有些自带的有问题。

猜你喜欢

转载自www.cnblogs.com/1394htw/p/10680191.html