Home > Development Tools > sublime > Solve the problem that Sublime Package Control cannot be installed

Solve the problem that Sublime Package Control cannot be installed

藏色散人
Release: 2020-09-10 09:24:36
forward
4493 people have browsed it

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/3

Solve the problem that Sublime Package Control cannot be installedThe 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

View-->show console

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)
Copy after login
So I tried it, but it didn’t work, an error was reported, and the console prompt is as follows:


## Unable to connect to the server, it should be blocked

Then another way:

Manually download a package control package: https://github.com/wbond/package_control

After opening the link, click Download ZIP on the right:

Unzip the downloaded package and unzip the folder Rename it to Package Control ,

Copy it to the packages directory of sublime, directly menu bar Perferences -->Browse Packages. Then copy the Package Control folder into it

Then click the menu bar again Perferences, you will find two more menus, Package Settings and Package Control, which means that Package Control is installed successfully.

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 list

But unfortunately, it fails again:

It prompts that https://packagecontrol.io/ cannot be accessed channel_v3.json. This should also be blocked...

Solution:

Open Package Settings-->Package Control --> Settings User

Add the following content:

"channels":
	[
		"http://cst.stu.126.net/u/json/cms/channel_v3.json",
	],
Copy after login

As shown:

##http://cst.stu.126.net/u/json/cms /channel_v3.json is a domestic battle point

Then try to install Emmet again, success!

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!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template