使用 brew 安装 git-lfs 时报错:brew install nginx报错Operation too slow. Less than 100 bytes/sec transferred the last 5 seconds。
a1@a1-MBP ~ % brew install git-lfs
==> Downloading https://formulae.brew.sh/api/formula.jws.json
curl: (28) Operation too slow. Less than 100 bytes/sec transferred the last 5 seconds
Error: Failure while executing; `/usr/bin/env /usr/local/Homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --user-agent Homebrew/4.3.2\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 14.5\)\ curl/8.6.0 --header Accept-Language:\ en --fail --progress-bar --remote-time --output /Users/a1/Library/Caches/Homebrew/api/formula.jws.json --location --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.3.2\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 14.5\)\ curl/8.6.0 --header Accept-Language:\ en --fail --progress-bar --compressed --speed-limit 100 --speed-time 5 https://formulae.brew.sh/api/formula.jws.json` exited with 28. Here's the output:
curl: (28) Operation too slow. Less than 100 bytes/sec transferred the last 5 seconds
解决办法
在终端执行:
export HOMEBREW_NO_INSTALL_FROM_API=1