V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
samport
V2EX  ›  macOS

求助 安装 homebrew 失败

  •  
  •   samport · 2022-04-18 22:48:51 +08:00 · 1335 次点击
    这是一个创建于 710 天前的主题,其中的信息可能已经有所发展或是发生改变。
    刚开始用 mac ,照着网上的装 homebrew 失败,开启退出梯子都不行
    $ /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh)"
    --> curl: (7) Failed to connect to 127.0.0.1 port 789: Connection refused

    https://imgur.com/a/LohoXel
    19 条回复    2022-04-19 15:54:28 +08:00
    dingwen07
        1
    dingwen07  
       2022-04-18 23:07:04 +08:00 via iPhone
    你这看样子是不是安装脚本,也不是官方的脚本,请去这里:

    https://brew.sh
    samport
        2
    samport  
    OP
       2022-04-18 23:13:23 +08:00
    @dingwen07 也不管用
    得到 curl: (7) Failed to connect to 127.0.0.1 port 789: Connection refused
    https://imgur.com/a/OYJwttl
    CenN
        3
    CenN  
       2022-04-18 23:19:13 +08:00 via iPhone
    @samport 是不是终端代理配错了,7890 端口。
    Ourobotos
        4
    Ourobotos  
       2022-04-19 00:24:45 +08:00
    gitee 上的不用挂代理吧,为啥 curl 会连 127 ?
    Granthese
        5
    Granthese  
       2022-04-19 03:12:39 +08:00 via iPad
    你这也不是『安装』脚本啊,“HomebrewUninstall.sh”怎么看都是『卸载』脚本吧
    要么『挂梯子+官方安装脚本』,要么『不挂梯子+国内源安装脚本』(推荐清华源)
    mctgyt
        6
    mctgyt  
       2022-04-19 04:52:06 +08:00   ❤️ 2
    看名称这是一个卸载脚本啊大哥
    seanzxx
        7
    seanzxx  
       2022-04-19 05:34:57 +08:00
    安装脚本看起来是这样的呀:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    xtinput
        8
    xtinput  
       2022-04-19 07:33:07 +08:00
    你的终端代理出问题了
    QingStone
        9
    QingStone  
       2022-04-19 07:34:54 +08:00 via iPhone   ❤️ 1
    脚本错误+代理错误
    imaning
        10
    imaning  
       2022-04-19 08:58:11 +08:00
    你这是网络不通啊,明显的代理不通咯。
    jfdnet
        11
    jfdnet  
       2022-04-19 09:19:11 +08:00
    connect to 127.0.0.1 port 789

    你这代理配置有问题吧。
    neptuno
        12
    neptuno  
       2022-04-19 09:48:24 +08:00
    1 、这是卸载脚本 2 、代理少配置了个 0 3 、不要看那种野鸡教程哇
    justin2018
        13
    justin2018  
       2022-04-19 10:17:56 +08:00
    ✈️全局

    https://brew.sh/

    使用官网脚本
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    wunonglin
        14
    wunonglin  
       2022-04-19 10:26:17 +08:00
    我英文不好的都看出来是你 127.0.0.1:789 链接失败了
    samport
        15
    samport  
    OP
       2022-04-19 10:40:56 +08:00
    @justin2018 感谢各位!
    ConerNight
        16
    ConerNight  
       2022-04-19 11:15:29 +08:00
    xman99
        17
    xman99  
       2022-04-19 11:56:27 +08:00
    m1 安装的,实测可以,https://zhuanlan.zhihu.com/p/341831809
    chenzheyu
        18
    chenzheyu  
       2022-04-19 15:18:12 +08:00
    你 clash 应该是 7890 吧,直接关掉应该就没问题了
    Askiz
        19
    Askiz  
       2022-04-19 15:54:28 +08:00 via Android
    如果要用代理下载的话
    把之前所有源配置都删掉
    然后写个 shell 脚本:
    # 配置 http 访问的
    export https_proxy=http://127.0.0.1:7890
    # 配置 https 访问的
    export http_proxy=http://127.0.0.1:7890
    # 配置 http 和 https 访问
    export all_proxy=socks5://127.0.0.1:7891

    上面的端口自己看你的 clash 用什么端口
    保存后在终端运行一下
    curl google.com 看代理有没有生效
    生效后直接运行 brew 安装命令即可
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5898 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 02:19 · PVG 10:19 · LAX 19:19 · JFK 22:19
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.