进入中国意味着有时您无法通过Brew升级来升级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改变其缓存结构的好坏之后,这似乎不再起作用(显然对我来说更糟)。 / p>
如果我想继续使用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,并将其重命名为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"
答案 0 :(得分:2)
例如,如果您想升级Gradle,可以使用以下方法找到Homebrew期望的缓存文件的位置和名称:
Push.PushNotificationReceived += (sender, e) =>
{
if (e.CustomData != null)
{
foreach (var key in e.CustomData.Keys)
{
switch (key)
{
case "news":
notifType = key;
notifVal = e.CustomData[key];
break;
case "other":
notifType = key;
notifVal = e.CustomData[key];
break;
}
}
}
// Send the notification summary to debug output
}
};
您将获得:
brew --cache gradle
从以下位置提取zip文件的网址:
/Users/myself/Library/Caches/Homebrew/downloads/ae76f5a0a19f5c141d5ee602a2ecb45011393fbba2206f3a960599d7bba92b9b--gradle-5.0-all.zip
下载文件并将其重命名为brew edit gradle
的输出
您甚至可以使用以下方法离线升级Gradle:
brew --cache
根据公式,您将必须手动安装其所有依赖项。
答案 1 :(得分:0)
如果您使用 -v
或 brew upgrade
的 brew install
选项或您使用的任何需要下载文件的命令,它将为您提供下载文件所在的输出文件走了。然后,您可以手动将文件下载到此位置。