Sublime text 3,Package Controll - 无法安装包

时间:2016-11-03 13:59:03

标签: ssl github sublimetext3 package-control

我在一周前意识到我无法通过Package Control安装任何新软件包。我尝试了一切甚至重新安装sublime,同时清理所有文件/库/应用程序支持/一切。仍然是同样的问题。有什么想法吗?

ignored packages updated to: ["Emmet", "Vintage"]
reloading settings Packages/User/Package Control.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings
Package Control: Error downloading package. HTTP exception InvalidCertificateException (Host codeload.github.com returned an invalid certificate ([SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:548))) downloading https://codeload.github.com/sergeche/emmet-sublime/zip/master.
error: Package Control

Unable to download Emmet. Please view the console for more details.
ignored packages updated to: ["Vintage"]
reloading settings Packages/User/Package Control.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings

2 个答案:

答案 0 :(得分:5)

您可以在~/.config/sublime-text-3/Packages/User/Package Control.sublime-settings中更改下载程序的优先级。

"downloader_precedence":
{
    "linux":
    [
        "urllib",
        "curl",
        "wget"
    ],
    "osx":
    [
        "curl",
        "urllib"
    ],
    "windows":
    [
        "wininet"
    ]
},

urllib更改为curl对我有用。

答案 1 :(得分:2)

对于OSX:

bhanu的答案是正确的,但是我的“包装控制设置-用户”文件不在该确切位置。更一般的说明:

  • 打开命令面板(在Mac上为Cmd + Shift + P)
  • 键入Package Control Settings
  • 打开“包装控制设置-默认”并搜索downloader_precedence
  • 可能看起来像这样-请注意,默认的osx下载器为"urllib"
"downloader_precedence": {
        "windows": ["wininet"],
        "osx": ["urllib"],
        "linux": ["urllib", "curl", "wget"]
    },
  • 您实际上无法编辑默认值。通过转到命令面板>“程序包控制设置-用户
  • 来覆盖此设置
  • 将上面的代码段复制粘贴到用户文件中(正确的缩进,如果需要,在现有设置之后添加逗号),并使"curl"成为第一个osx下载器:
"downloader_precedence": {
        "windows": ["wininet"],
        "osx": ["curl", "urllib"],
        "linux": ["urllib", "curl", "wget"]
    },