The following tutorial column will introduce to you how to solve the problem that Sublime Package Control cannot be installed. I hope it will be helpful to friends who need it!
Sublime Text3 official website download address: http://www.sublimetext.com/3The first thing after downloading is to install the package manager Package Control, but after trying for a long time, it cannot be installed successfully!
1. Install Package Control
A long time ago, if you wanted to install Package Control in Sublime text 3, you had to install Git first, and then enter the code to install it.
But later a convenient installation method came out, which is through the command line: Through ctrl `
shortcut key or
Menu opens the console, copy and paste the following code and press Enter: import urllib.request,os,hashlib; h = 'df21e130d211cfc94d9b0905775a7c0f' + '1e3d39e33b79698005270310898eea76'; 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)
## Unable to connect to the server, it should be blocked
Then another way:
Unzip the downloaded package and unzip the folder Rename it to Package Control ,
2. Install plug-in
Okay, let’s try to install a plug-in, such as Emmet, Ctrl Shift P to open the console, enter install, select Install Package, press Enter, you have to wait at this time After a while, because Package Control is loading the plug-in listBut unfortunately, it fails again:It prompts that https://packagecontrol.io/ cannot be accessed channel_v3.json. This should also be blocked...
Solution:
Add the following content:
"channels": [ "http://cst.stu.126.net/u/json/cms/channel_v3.json", ],
As shown:
Let’s start the front-end journey! ! !
The above is the detailed content of Solve the problem that Sublime Package Control cannot be installed. For more information, please follow other related articles on the PHP Chinese website!