gpt4 book ai didi

homebrew - 如何手动下载brew包进行安装?

转载 作者:行者123 更新时间:2023-12-03 23:14:34 32 4
gpt4 key购买 nike

在中国意味着有时你无法通过 brew upgrade 升级 brew 包,它会遇到这样的错误:

curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to cli-assets.heroku.com:443 
Error: An exception occurred within a child process:
DownloadError: Failed to download resource "heroku"
Download failed: https://cli-assets.heroku.com/heroku-v7.18.10/heroku-v7.18.10.tar.xz

我曾经将这些失败的包下载到 ~/Library/Caches/Homebrew ,然后再次运行该命令,但在 brew 改变其缓存结构后,这似乎不再起作用(显然对我来说更糟)。

如果我想继续使用 brew 升级我的所有软件包,我现在该怎么办?

在我尝试了你的方法后,这是弹出的错误:
==> Upgrading heroku/brew/heroku 
==> Installing dependencies for heroku/brew/heroku: heroku/brew/heroku-node
==> Installing heroku/brew/heroku dependency: heroku/brew/heroku-node
==> Downloading https://cli-assets.heroku.com/homebrew/node-11.3.0.tar.xz

curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to cli-assets.heroku.com:443
Error: An exception occurred within a child process:
DownloadError: Failed to download resource "heroku-node"
Download failed: https://cli-assets.heroku.com/homebrew/node-11.3.0.tar.xz

另外,假设我从 https://dl.google.com/go/go1.11.4.src.tar.gz 下载并将其重命名为 go--git ,这是 brew --cache go 的输出,但它仍然安装失败。
fatal: unable to access 'https://go.googlesource.com/tools.git/': Failed to connect to go.googlesource.com port 443: Operation timed out
Error: An exception occurred within a child process:
DownloadError: Failed to download resource "go--gotools"
Failure while executing; `git clone --branch release-branch.go1.11 https://go.googlesource.com/tools.git /Users/aero/Library/Caches/Homebrew/go--gotools--git` exited with 128. Here's the output:
Cloning into '/Users/aero/Library/Caches/Homebrew/go--gotools--git'...
fatal: unable to access 'https://go.googlesource.com/tools.git/': Failed to connect to go.googlesource.com port 443: Operation timed out

如果我运行 brew --cache go--gotools ,它会说 Error: No available formula with the name "go--gotools"

最佳答案

例如,如果您想升级 Gradle,您可以使用以下命令找到 Homebrew 期望的缓存文件的位置和名称:

brew --cache gradle

您将获得:
/Users/myself/Library/Caches/Homebrew/downloads/ae76f5a0a19f5c141d5ee602a2ecb45011393fbba2206f3a960599d7bba92b9b--gradle-5.0-all.zip

从以下位置提取 zip 文件的 url:
brew edit gradle

下载文件并将其重命名为 brew --cache 的输出

然后,您甚至可以通过以下方式离线升级 Gradle:
brew upgrade gradle

根据公式,您必须手动安装它们的所有依赖项。

关于homebrew - 如何手动下载brew包进行安装?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53551665/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com