美文网首页Development
fatal: unable to access 'https:/

fatal: unable to access 'https:/

作者: survivorsfyh | 来源:发表于2020-01-13 16:40 被阅读0次

    安装 Homebrew 执行完安装语句

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

    抛出如下异常

    fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
    Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1` exited with 128.
    Error: Failure while executing; `/usr/local/bin/brew tap homebrew/core` exited with 1.
    Failed during: /usr/local/bin/brew update --force
    

    解决办法

    survivors@sdeMacBook-Pro ~ % git clone git://mirrors.ustc.edu.cn/homebrew-core.git/ /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1
    
    Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
    remote: Counting objects: 5105, done.
    remote: Compressing objects: 100% (4904/4904), done.
    remote: Total 5105 (delta 44), reused 886 (delta 5)
    Receiving objects: 100% (5105/5105), 4.14 MiB | 1.17 MiB/s, done.
    Resolving deltas: 100% (44/44), done.
    survivors@sdeMacBook-Pro ~ % cd "$(brew --repo)" 
    survivors@sdeMacBook-Pro Homebrew % git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
    survivors@sdeMacBook-Pro Homebrew % cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
    survivors@sdeMacBook-Pro homebrew-core % git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
    
    survivors@sdeMacBook-Pro homebrew-core % brew update
    Already up-to-date.
    

    如上终端中 code 所示,执行如下语句
    首先,更换有效的镜像地址;

    git clone git://mirrors.ustc.edu.cn/homebrew-core.git/ /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1
    

    其次,前往至 homebrew-core 将其当前的镜像地址也更为有效的地址;

    cd "$(brew --repo)" 
    git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
    cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" 
    git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
    

    再其次,将如上配置文件内容更替后,重新执行更新;

    brew update
    

    最后,执行完如上操作后,终端显示如下字样内容即可。

    Already up-to-date.
    
    异常全过程处理

    以上便是此次分享的全部内容,希望能对大家有所帮助!

    相关文章

      网友评论

        本文标题:fatal: unable to access 'https:/

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