美文网首页
Mac安装Homebrew,报错xxx Failed to co

Mac安装Homebrew,报错xxx Failed to co

作者: 郁南 | 来源:发表于2020-06-06 11:58 被阅读0次

    由于是mac小白,之前安装了很多次homebrew都安装失败,今天偶然再安装一次居然成功了,下面是安装过程

    1. 问题场景

    按照网上教程使用以下命令安装homebrew

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    

    但是每次都报错,报错信息为curl: (7) Failed to connect to raw.githubusercontent.com port 443: Operation

    2. 解决办法

    1. 先下载Homebrew文件
      百度云 ,提取码: 4eti
    2. 找一个目录存放这个文件,并改名为homebrew_install.rb,有时候可能是brew_install.rb
    3. 测试curl命令是否可以正常使用;
    curl
    

    执行结果为:curl: try 'curl --help' or 'curl --manual' for more information,证明curl命令可以正常使用,若不可以,先解决curl的问题再进行下一步;

    1. 进入homebrew_install.rb所在的文件夹,执行命令即可完成安装
      1.进入存放 homebrew_install.rb 的目录中,
      2.执行 ruby homebrew_install.rb, 根据提示输入电脑密码然后回车 安装就行了
    2. 安装成功信息
     * [new tag]             2.3.0      -> 2.3.0
    HEAD is now at aff92b3af Merge pull request #7606 from vitorgalvao/appcast-configuration-match
    ==> Tapping homebrew/core
    Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
    remote: Enumerating objects: 729931, done.
    remote: Total 729931 (delta 0), reused 0 (delta 0), pack-reused 729931
    Receiving objects: 100% (729931/729931), 295.30 MiB | 1.57 MiB/s, done.
    Resolving deltas: 100% (482405/482405), done.
    Tapped 2 commands and 5034 formulae (5,302 files, 323.7MB).
    Already up-to-date.
    ==> Installation successful!
    
    ==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
    Read the analytics documentation (and how to opt-out) here:
      https://docs.brew.sh/Analytics
    
    ==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
      https://github.com/Homebrew/brew#donations
    ==> Next steps:
    - Run `brew help` to get started
    - Further documentation: 
        https://docs.brew.sh
    

    相关文章

      网友评论

          本文标题:Mac安装Homebrew,报错xxx Failed to co

          本文链接:https://www.haomeiwen.com/subject/yaxxtktx.html