Sublime Text 2 Package Control error

2019-03-27 02:25发布

CTRL SHIFT P -> Package control : Install package

If I go here, I get an error straight away

'Package Control: There are no packages available for installation'

I suspect this might be because of my college authenticated proxy. But I've already set my system variables regarding this correctly, so stuff like URLLIB2 work well.

I also added (with the correct values)

"http_proxy": "http://id:pass@proxy:port",
"https_proxy": "http://id:pass@proxy:port", 

to Package control's default settings. Still I'm getting this error. Any idea how to debug this further?

7条回答
聊天终结者
2楼-- · 2019-03-27 03:02

I had the same issue with my settings, you have to set your proxy in the general Settings - User file for Sublime Text, not the general settings in the Package Control.

查看更多
Deceive 欺骗
3楼-- · 2019-03-27 03:11

Use follow code to install Package controll. Replace your proxy protocol, username , password , url and port config:

import urllib2,os,hashlib; h = 'eb2297e1a458f27d836c04bb0cbaf282' + 'd0e7a3098092775ccb37ca9d6b2e4b7d'; 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({"http": "<proxy protocol><user>:<password>@<proxy url>:<proxy port>"})) ); 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')
查看更多
等我变得足够好
4楼-- · 2019-03-27 03:14

I fix it by following steps:

  1. open your Internet Explorer
  2. tools →internet options→ advanced tag→ Security → Cancel "Check for Server Certificate revocation" this checkbox
  3. Restart your Sublime Text and it work!
查看更多
Viruses.
5楼-- · 2019-03-27 03:16

I fixed this by adding "http_proxy": "your.proxy:port", "https_proxy": "your.proxy:port" to the end of my User/Package Control.sublime-settings config file.

查看更多
甜甜的少女心
6楼-- · 2019-03-27 03:18

Make sure curl is installed as the package controller needs it.

apt-get install curl
查看更多
可以哭但决不认输i
7楼-- · 2019-03-27 03:18

You should specify your credentials using separate parameters proxy_username and proxy_password in your User Settings. Do not use http:// or any other prefixes in proxy URL, since http_proxy and https_proxy should contain only proxy server domain (or IP) and port, separated by a colon.

I've experienced same trouble on my work machine because of NTLM proxy, and following settings works for me:

"http_proxy": "my-company-proxy:3128",
"https_proxy": "my-company-proxy:3128",
"proxy_username": "my-company-domain\\mamontov_se", // domain\login
"proxy_password": "MyPa$$w0rD",
查看更多
登录 后发表回答