Tiven

Tiven

博观而约取,厚积而薄发

天问的个人网站(天问博客),专注于Node.js、Vue.js、React、Vite、Npm、Nginx等大前端技术。不断学习新技术,记录日常开发问题,持续分享coding,极客开源,共同进步。生命不息,奋斗不止... [ hexo blog ]

brew install nginx报错Operation too slow. Less than 100 bytes/sec transferred the last 5 seconds


使用 brew 安装 nginx 时报错:brew install nginx报错Operation too slow. Less than 100 bytes/sec transferred the last 5 seconds

brew install nginx

完整报错信息

tiven@bogon% brew install nginx
==> Downloading https://formulae.brew.sh/api/formula.jws.json
brew update-=O=-            #     #    #     #                                  brew update-=O=-          #     #    #     #                                    brew update-=O=-       #   #     #    #                                         curl: (28) Operation too slow. Less than 100 bytes/sec transferred the last 5 seconds

Error: Failure while executing; `/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --user-agent Homebrew/4.0.13\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.2.1\)\ curl/7.86.0 --header Accept-Language:\ en --fail --progress-bar --location --remote-time --output /Users/tiven/Library/Caches/Homebrew/api/formula.jws.json --compressed --speed-limit 100 --speed-time 5 --progress-bar 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

参考文档


欢迎访问:天问博客