Sublime Text 3 - 包装控制:"没有可用于安装的包装"尝试通过安全通道安装软件包时出错

时间:2014-08-29 00:09:53

标签: sublimetext sublimetext3 ubuntu-14.04 package-control

我在Ubuntu 14.04 LTS 64位上运行Sublime。我尝试使用简单脚本和手动安装方法在Sublime Text 3上安装Package Installer。

每当我尝试运行Install Package选项时,都会收到一条错误消息“没有可用于安装的软件包”

控制台显示以下跟踪:

Package Control: Error downloading channel. b'curl: (77) error setting certificate verify locations:\n  CAfile: /usr/lib/ssl/certs/ca-certificates.crt\n  CApath: /etc/ssl/certs' downloading https://sublime.wbond.net/channel.json.
error: Package Control
There are no packages available for installation

如果我将http://sublime.wbond.net/repositories.json添加为频道,则安装包会开始显示包列表。但是,当我尝试安装软件包(例如Pretty JSON)时,我再次收到与安全证书相关的错误,并带有以下控制台跟踪:

reloading Packages/User/Preferences.sublime-settings
found 1 files for base name Default.sublime-theme
Package Control: Error downloading package. b'curl: (77) error setting certificate verify locations:\n  CAfile: /usr/lib/ssl/certs/ca-certificates.crt\n  CApath: /etc/ssl/certs' downloading https://codeload.github.com/dzhibas/SublimePrettyJson/zip/master.
error: Package Control

Unable to download Pretty JSON. Please view the console for more details.
theme loaded
ignored packages updated to: [Vintage]
found 1 files for base name Default.sublime-theme
theme loaded
reloading Packages/User/Preferences.sublime-settings
found 1 files for base name Default.sublime-theme
theme loaded

欢迎任何建议让Package Control与安全通道一起使用。

包裹控制的其他调试痕迹:

程序包控制启用debug后,我得到以下跟踪:

Package Control: Fetching list of available packages
  Platform: linux-x64
  Sublime Text Version: 3059
  Package Control Version: 2.0.0
Package Control: Download Debug
  URL: https://sublime.wbond.net/channel.json
  Resolved IP: 50.116.34.243
  Timeout: 30
Package Control: Found system CA bundle at /usr/lib/ssl/certs/ca-certificates.crt
Package Control: Curl Debug Proxy
  http_proxy: 
  https_proxy: 
  proxy_username: 
  proxy_password: 
Package Control: Trying to execute command /usr/bin/curl --user-agent 'Sublime Package Control     v2.0.0' --connect-timeout 30 -sSL --compressed --dump-header /tmp/tmp_i20fq --cacert     /usr/lib/ssl/certs/ca-certificates.crt -v https://sublime.wbond.net/channel.json
Package Control: Curl HTTP Debug General
  Hostname was NOT found in DNS cache
    Trying 50.116.34.243...
  Connected to sublime.wbond.net (50.116.34.243) port 443 (#0)
  error setting certificate verify locations:
    CAfile: /usr/lib/ssl/certs/ca-certificates.crt
    CApath: /etc/ssl/certs
  Closing connection 0
    CAfile: /usr/lib/ssl/certs/ca-certificates.crt
    CApath: /etc/ssl/certs
Package Control: Error downloading channel. curl: (77) error setting certificate verify locations: downloading https://sublime.wbond.net/channel.json.
ignored packages updated to: [Vintage, Pretty JSON]
found 1 files for base name Default.sublime-theme
Package Control: Fetching list of available packages
  Platform: linux-x64
  Sublime Text Version: 3059
  Package Control Version: 2.0.0
theme loaded
Package Control: Download Debug
  URL: https://sublime.wbond.net/channel.json
  Resolved IP: 50.116.34.243
  Timeout: 30
Package Control: Found system CA bundle at /usr/lib/ssl/certs/ca-certificates.crt
Package Control: Curl Debug Proxy
  http_proxy: 
  https_proxy: 
  proxy_username: 
  proxy_password: 
Package Control: Trying to execute command /usr/bin/curl --user-agent 'Sublime Package Control     v2.0.0' --connect-timeout 30 -sSL --compressed --dump-header /tmp/tmpcg0ent --cacert     /usr/lib/ssl/certs/ca-certificates.crt -v https://sublime.wbond.net/channel.json
Package Control: Curl HTTP Debug General
  Hostname was NOT found in DNS cache
    Trying 50.116.34.243...
  Connected to sublime.wbond.net (50.116.34.243) port 443 (#0)
  error setting certificate verify locations:
    CAfile: /usr/lib/ssl/certs/ca-certificates.crt
    CApath: /etc/ssl/certs
  Closing connection 0
    CAfile: /usr/lib/ssl/certs/ca-certificates.crt
    CApath: /etc/ssl/certs
Package Control: Error downloading channel. curl: (77) error setting certificate verify locations:    downloading https://sublime.wbond.net/channel.json.
Package Control: Unable to find a sublime-package file for Pretty JSON
Package Control: Unable to find file package-metadata.json in the package Pretty JSON
Package Control: Download Debug
  URL: https://codeload.github.com/dzhibas/SublimePrettyJson/zip/master
  Resolved IP: 192.30.252.146
  Timeout: 30
Package Control: Found system CA bundle at /usr/lib/ssl/certs/ca-certificates.crt
Package Control: Curl Debug Proxy
  http_proxy: 
  https_proxy: 
  proxy_username: 
  proxy_password: 
Package Control: Trying to execute command /usr/bin/curl --user-agent 'Sublime Package Control     v2.0.0' --connect-timeout 30 -sSL --compressed --dump-header /tmp/tmpueshe5 --cacert   /usr/lib/ssl/certs/ca-certificates.crt -v https://codeload.github.com/dzhibas/SublimePrettyJson/zip/master
reloading Packages/User/Preferences.sublime-settings
found 1 files for base name Default.sublime-theme
Package Control: Curl HTTP Debug General
  Hostname was NOT found in DNS cache
    Trying 192.30.252.147...
  Connected to codeload.github.com (192.30.252.147) port 443 (#0)
  error setting certificate verify locations:
    CAfile: /usr/lib/ssl/certs/ca-certificates.crt
    CApath: /etc/ssl/certs
  Closing connection 0
    CAfile: /usr/lib/ssl/certs/ca-certificates.crt
    CApath: /etc/ssl/certs
Package Control: Error downloading package. curl: (77) error setting certificate verify locations:     downloading https://codeload.github.com/dzhibas/SublimePrettyJson/zip/master.
error: Package Control

Unable to download Pretty JSON. Please view the console for more details.

13 个答案:

答案 0 :(得分:33)

今天有同样的问题。重新安装包控件:

...即

  1. 点击偏好设置>浏览包...菜单
  2. 浏览文件夹,然后进入已安装的软件包/文件夹
  3. 下载Package Control.sublime-package并将其复制到Installed Packages /目录
  4. 重新启动Sublime文本
  5. 像魅力一样工作!

答案 1 :(得分:21)

今天我在使用Sublime Text Build 3126的Ubuntu 16.04 LTS 64位中遇到了同样的问题。

根据Github issue page的建议,我解决了这个问题。

将以下行复制粘贴到

偏好设置>套餐设置>包控制>设置 - 用户。

"channels":
[
"https://packagecontrol.io/channel_v3.json",
"https://web.archive.org/web/20150905194312/https://packagecontrol.io/channel_v3.json"
],

答案 2 :(得分:8)

我在升级后遇到了同样的问题,但是在自述文件中看到了这个并运行了这个为我修复它的python脚本(ctrl +'调出控制台然后运行以下命令)

import urllib.request,os,sys; exec("if sys.version_info < (3,) or os.name != 'nt': raise OSError('This code is for Windows ST3 only!')"); pr='Preferences.sublime-settings'; ip='ignored_packages'; n='Package Control'; s=sublime.load_settings(pr); ig=s.get(ip); ig.append(n); s.set(ip,ig); sublime.save_settings('Preferences.sublime-settings'); pf=n+'.sublime-package'; urllib.request.install_opener(urllib.request.build_opener(urllib.request.ProxyHandler())); by=urllib.request.urlopen('https://packagecontrol.io/'+pf.replace(' ','%20')).read(); open(os.path.join(sublime.installed_packages_path(),pf),'wb').write(by); ig.remove(n); s.set(ip,ig); sublime.save_settings(pr); print('Package Control: 3.0.0 upgrade successful!')

答案 3 :(得分:5)

昨天我遇到了这个问题,并尝试了@Juri的回答,但由于网络错误而无法下载Package Control.sublime-package,因此无法正常工作。然后,我今天尝试正常安装软件包,并且可以正常工作。因此,问题与软件包管理器(https://packagecontrol.io/)的服务器有关,您应该等待直到问题解决。

答案 4 :(得分:2)

检查

中的代理设置
Preferences > Package Settings > Package Control > Settings – Default / User

如果代理设置无效,您也会收到此错误。

答案 5 :(得分:0)

立即重试。我认为Web管理员修复了证书问题 - 您可能需要删除软件包控制文件并重新安装(但您可以保留设置和其他软件包已安装)。

此外,如果你没有安装 cURL ,似乎也会失败,但你确实如此。

答案 6 :(得分:0)

使用手动方法安装软件包(请按照以下步骤操作):

  • 点击“偏好设置”>“浏览软件包...”菜单
  • 浏览一个文件夹,然后进入“ Installed Packages /”文件夹
  • 下载Package Control.sublime-package并将其复制到Installed Packages /目录中
  • 重新启动崇高文字

然后别忘了像下面这样将代理和端口添加到文件"http_proxy": "[proxy]:[port]"

MISIC MISIĆ MISIČ MIŠIC MIŠIĆ MIŠIČ

答案 7 :(得分:0)

在撰写本文时,项目维护者的软件包控制服务器有问题。

有关恢复进度或您希望提供支持的更多信息,请参见https://forum.sublimetext.com/t/package-control-outage/41274/31

同时,为了访问您要安装的软件包,您可以在google中搜索软件包名称,并使用缓存的google页面来找到软件包的项目页面。

例如,您可以搜索“ sublime text 3 predawn”,然后进入软件包项目页面(在本例中为github)以手动下载并安装它。

Search Results

从缓存的程序包控制页面导航到项目页面。通过项目页面,您可以访问软件包以及手动安装过程。

Package Control Cached

答案 8 :(得分:0)

有效答案在这里: [FIX] Sublime错误-没有可用于安装的软件包-100%正常工作

https://mrmoeed.blogspot.com/2019/09/fix-sublime-error-there-are-not.html

答案 9 :(得分:0)

有同样的问题,控制台在https://packagecontrol.io/channel_v3.json处显示403错误。

我必须手动下载文件,然后将频道更改为计算机中的文件。不知道这是否是最可靠的方法,因为您可能需要再次下载该文件才能查看最新的软件包,但这是唯一对我有用的方法。

因此只需从以下位置下载文件:https://packagecontrol.io/channel_v3.json

通过以下方式将文件添加到您的频道:

首选项>程序包设置>程序包控制>设置-用户。

赞:

"channels":
[
    "C:\\Users\\YourUser\\Downloads\\channel_v3.json"
],

答案 10 :(得分:0)

我有同样的问题。我在MAC OS Catalina 10.15.6上使用Sublime Text 3

下面的更改问题已解决,例如gem!

转到

Preferences > Package Settings > Package Control > Settings – Default / User

并在下面几行添加

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

答案 11 :(得分:0)

我最近遇到了与使用curl,apt-get,wget进行SSL验证有关的事件,并试图通过Sublime安装软件包:

mlazo@mlazo-pc:~$ dpkg -l |grep -i ca-certificates
ii  ca-certificates                                                  20201027ubuntu0.18.04.1                             all          Common CA certificates

在网上冲浪时,我发现有一个管理ca证书的软件包,那就是:

sudo apt-get install --reinstall ca-certificates

因此,我按照以下步骤重新安装它:

input[type="checkbox"],
input[type="radio"] {
  filter: hue-rotate(140deg);
  }

重新安装主软件包后,我将继续在Sublime上安装软件包,其击键“ Cntrl + Shift + P ”得到成功的结果。

我真的希望这些信息对其他人有帮助。

最诚挚的问候,

Manuel Lazo

答案 12 :(得分:-2)

对于Mac用户::解决方案您需要做什么。

开放系统偏好 - &gt;网络 - &gt;高级 - &gt;代理 然后从代理文本区域中删除所有内容。 取消选中使用FTP模式。

是的,就是这样。

退出Sublime,再次重启并点击CMD + Shift + P