【问题标题】:Package retrieving error is occurred while installing Chocolatey packages安装 Chocolatey 包时发生包检索错误
【发布时间】:2019-11-11 16:46:15
【问题描述】:

我已经用 nuget.exe 安装了 Chocolatey,并尝试下载 Ruby 包。

但是,安装失败并显示消息The package was not found with the source(s) listed.

C:\Users\nblizz>sudo choco install ruby -y
Chocolatey v0.10.14
Installing the following packages:
ruby
By installing you accept licenses for the packages.
Error retrieving packages from source 'https://chocolatey.org/api/v2/':
 The underlying connection was closed: An unexpected error occurred on a send.
ruby not installed. The package was not found with the source(s) listed.
 Source(s): 'https://chocolatey.org/api/v2/'
 NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify `--pre`,
 the package may not be found.
Please see https://chocolatey.org/docs/troubleshooting for more
 assistance.

Chocolatey installed 0/1 packages. 1 packages failed.
 See the log for details (c:\ProgramData\chocoportable\logs\chocolatey.log).

Failures
 - ruby - ruby not installed. The package was not found with the source(s) listed.
 Source(s): 'https://chocolatey.org/api/v2/'
 NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify `--pre`,
 the package may not be found.
Please see https://chocolatey.org/docs/troubleshooting for more
 assistance.

我已经在以管理员模式运行的命令提示符下进行了尝试。问题是什么? Ruby包的安装命令是choco install ruby,我直接输入了。

【问题讨论】:

  • 根据您看到的输出,我不清楚为什么找不到这个包。我刚刚运行了相同的命令,它按预期工作。您是否有任何可能阻止访问 Chocolatey.org 的代理?
  • @GaryEwanPark 我不知道为什么,但是将我的互联网连接从 Wi-Fi 更改为有线互联网后它运行良好。
  • 这听起来与我有关的网络,但请记住,公共 Chocolatey 存储库有时会出现问题,我之前已经看到我们收到 An unexpected error occurred on a send 错误。我们现在为我们的包使用一个私人仓库。
  • 我在升级命令方面面临同样的问题。我可以在浏览器中打开包的 URL。如果我连接到有线网络,我还没有尝试过会发生什么,但这听起来不对。

标签: chocolatey


【解决方案1】:

在我的情况下我想通了 - 我没有使用正确的包名称。确保您使用的是全名,如果您收到此错误,请在网站上进行验证 (https://chocolatey.org/packages/)

【讨论】:

    【解决方案2】:

    然后以管理员身份运行cmd

    choco install elixir

    【讨论】:

      猜你喜欢
      • 2017-09-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-23
      • 2017-05-15
      • 2023-02-22
      相关资源
      最近更新 更多