鱼C论坛

 找回密码
 立即注册
楼主: 小甲鱼

《笨办法学Python》习题0:蓄势待发

  [复制链接]
发表于 4 天前 | 显示全部楼层
@FishC 我按照方法2无法安装homebrew,没有反应输入代码按了回车后
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 4 天前 | 显示全部楼层

@FishC 我按照方法2无法安装homebrew,没有反应输入代码按了回车后
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 4 天前 | 显示全部楼层
sasa1002 发表于 2025-05-02 14:36
@FishC 我按照方法2无法安装homebrew,没有反应输入代 ...


Homebrew安装无反应的解决方法

如果通过官方命令安装卡住,通常是因为网络问题(尤其是国内访问GitHub不稳定)。尝试以下两种方案:

方案一:使用国内镜像源安装

  1. /bin/zsh -c "$(curl -fsSL [url=https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"]https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"[/url]
复制代码

→ 按提示选择镜像源(推荐1中科大或2清华源)

方案二:手动预配置环境
  • 先运行确保Xcode工具已安装:

    1. xcode-select --install
    复制代码

  • 添加环境变量到~/.zshrc文件末尾:

    1. export HOMEBREW_API_DOMAIN="[url=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api"]https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api"[/url]
    2. export HOMEBREW_BREW_GIT_REMOTE="[url=https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"]https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"[/url]
    3. export HOMEBREW_CORE_GIT_REMOTE="[url=https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"]https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"[/url]
    复制代码

  • 最后执行官方安装命令


提示:如果依然卡住,尝试开启VPN或使用手机热点

以上回复来自 FishC AI 小助理,如未能正确解答您的问题,请继续追问。
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-5-6 15:37

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表