专业的编程技术博客社区

网站首页 > 博客文章 正文

【mac】 brew update报错SSL_ERROR_SYSCALL error

baijin 2024-09-02 11:08:49 博客文章 4 ℃ 0 评论

在mac下面更新安装报错如下:

$ brew update -vvv
Checking if we need to fetch /usr/local/Homebrew...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-binary...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services...
Fetching /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask...
Fetching /usr/local/Homebrew...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/phinze/homebrew-cask...
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-binary...
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services...
Fetching /usr/local/Homebrew/Library/Taps/phinze/homebrew-cask...
git: 'credential-osxkeychain' is not a git command. See 'git --help'.
fatal: could not read Username for 'https://github.com': terminal prompts disabled
remote: Enumerating objects: 7435, done.
remote: Counting objects: 100% (4996/4996), done.
remote: Compressing objects: 100% (1320/1320), done.
remote: Total 4161 (delta 3101), reused 3772 (delta 2786), pack-reused 0
Receiving objects: 100% (4161/4161), 1.06 MiB | 7.00 KiB/s, done.
Resolving deltas: 100% (3101/3101), completed with 307 local objects.
From https://github.com/Homebrew/brew
   8398d0b2d..ecea0e5ab  master     -> origin/master
 * [new tag]             2.2.10     -> 2.2.10
 * [new tag]             2.2.11     -> 2.2.11
 * [new tag]             2.2.12     -> 2.2.12
 * [new tag]             2.2.13     -> 2.2.13
 * [new tag]             2.2.3      -> 2.2.3
 * [new tag]             2.2.4      -> 2.2.4
 * [new tag]             2.2.5      -> 2.2.5
 * [new tag]             2.2.6      -> 2.2.6
 * [new tag]             2.2.7      -> 2.2.7
 * [new tag]             2.2.8      -> 2.2.8
 * [new tag]             2.2.9      -> 2.2.9
fatal: unable to access 'https://github.com/phinze/homebrew-cask/': LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
^R
^@fatal: unable to access 'https://github.com/caskroom/homebrew-cask/': transfer closed with outstanding read data remaining
fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
fatal: unable to access 'https://github.com/Homebrew/homebrew-cask/': LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60
Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-binary failed!
Fetching /usr/local/Homebrew/Library/Taps/phinze/homebrew-cask failed!
Fetching /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask failed!
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask failed!
Updating /usr/local/Homebrew...
Branch master set up to track remote branch master from origin.
Switched to and reset branch 'master'
Your branch is up-to-date with 'origin/master'.
Switched to and reset branch 'stable'
Current branch stable is up to date.

Updating /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services...
First, rewinding head to replay your work on top of it...
Fast-forwarded master to origin/master.

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics have been recorded yet (or will be during this `brew` run).

git config --replace-all homebrew.analyticsmessage true
git config --replace-all homebrew.caskanalyticsmessage true
Updated 1 tap (homebrew/services).
No changes to formulae.

解决办法:把镜像换中科院的国内镜像

# brew 程序本身,Homebrew 相同
git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git
# 以下针对 mac OS 系统上的 Homebrew
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
$ brew update -vvv
Checking if we need to fetch /usr/local/Homebrew...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask...
Fetching /usr/local/Homebrew...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-binary...
Fetching /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services...
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-binary...
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/phinze/homebrew-cask...
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
Fetching /usr/local/Homebrew/Library/Taps/phinze/homebrew-cask...
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services...
git: 'credential-osxkeychain' is not a git command. See 'git --help'.
fatal: could not read Username for 'https://github.com': terminal prompts disabled
remote: Enumerating objects: 19951, done.
remote: Counting objects: 100% (19951/19951), done.
remote: Compressing objects: 100% (7990/7990), done.
remote: Total 18576 (delta 13575), reused 15543 (delta 10586)
Receiving objects: 100% (18576/18576), 7.44 MiB | 197.00 KiB/s, done.
Resolving deltas: 100% (13575/13575), completed with 1316 local objects.
From https://mirrors.ustc.edu.cn/homebrew-cask  #可以看到使用设置的源了
   4b6bc1e96d..eea224df48  master     -> origin/master

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表