在macOS上通过homebrew进行软件包安装期间,如果我的网络不稳定并且一次下载失败,homebrew将下载源代码并从源代码开始构建。这将花费很长时间并且CPU使用率很高,这是不必要的。我该如何告诉自制程序重试,或者在下载失败时才停止?
==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.27.1.mojave.bottle.tar.gz
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to homebrew.bintray.com:443
Error: Failed to download resource "sqlite"
Download failed: https://homebrew.bintray.com/bottles/sqlite-3.27.1.mojave.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading https://sqlite.org/2019/sqlite-autoconf-3270100.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/sqlite/3.27.1 --enable-dynamic-extensions --enable-readline --disable-editline
^C
答案 0 :(得分:1)
如果失败,您可以brew fetch --retry <formula>
重试获取。取出瓶子后,就可以brew install
了。
用以下命令组合两个命令:
brew fetch --retry <formula> && brew install <formula>
答案 1 :(得分:1)