Warning formula.jws.json update failed, falling back to cached version
Warning: formula.jws.json: update failed, falling back to cached version.
MacOS 执行服务启动命令时,显示下载失败警告,导致无法启动服务
MacBook-Pro ~ % brew services start nginx ==> Downloading https://formulae.brew.sh/api/formula.jws.json ######## 4.5%curl: (28) Operation too slow. Less than 100 bytes/sec transferred the last 5 seconds Warning: formula.jws.json: update failed, falling back to cached version. ==> Downloading https://formulae.brew.sh/api/formula.jws.json ## 1.4%curl: (28) Operation too slow. Less than 100 bytes/sec transferred the last 5 seconds Warning: formula.jws.json: update failed, falling back to cached version. ==> Downloading https://formulae.brew.sh/api/formula.jws.json ############# 6.7%curl: (28) Operation too slow. Less than 100 bytes/sec transferred the last 5 seconds Warning: formula.jws.json: update failed, falling back to cached version. ==> 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.1.21\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 14.5\)\ curl/8.6.0 --header Accept-Language:\ en --fail --progress-bar --remote-time --output /Users/advoster/Library/Caches/Homebrew/api/formula.jws.json --location --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.1.21\ \(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
解决方案
修改 HOMEBREW_API_DOMAIN
export HOMEBREW_API_DOMAIN="https://mirrors.ustc.edu.cn/homebrew-bottles/api" # 或 export HOMEBREW_API_DOMAIN="https://mirrors.aliyun.com/homebrew/homebrew-bottles/api"
如该命令只在终端窗口执行,那么这个命令只会对当前终端窗口有效,想要永久保存这个参数的话,请将该命令添加到名为 .zshrc 的配置文件中去。
想要新的配置立即生效,执行如下命令:
source ~/.zshrc
-
重新执行服务启动命令结果:
MacBook-Pro ~ % brew services start nginx ==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/api/formula.jws.json ################################################################################################################################################################################################### 100.0% Service `nginx` already started, use `brew services restart nginx` to restart.
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 清华大学推出第四讲使用 DeepSeek + DeepResearch 让科研像聊天一样简单!
· 推荐几款开源且免费的 .NET MAUI 组件库
· 实操Deepseek接入个人知识库
· 易语言 —— 开山篇
· 【全网最全教程】使用最强DeepSeekR1+联网的火山引擎,没有生成长度限制,DeepSeek本体