ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

macOS 安装homebrew

2022-08-20 08:30:08  阅读:210  来源: 互联网

标签:core macOS git com install Homebrew homebrew 安装


打开官方链接homebrew

# 安装命令
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# 上述命令在安装过程中,会出现超时,链接不到github的问题
curl: (7) Failed to connect to http://raw.githubusercontent.com port 443: Operation timed out

# 解决方案是,把安装的shell脚本下载下来安装
git clone https://github.com/Homebrew/install.git

# 进入目录并执行安装脚步
cd install && /bin/bash install.sh

# 在安装过程中可能会出现
fatal: unable to access 'https://github.com/Homebrew/homebrew-core.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 

# 把home-core的包下载下来
cd "$(brew --repo)/Library/Taps/"
mkdir Homebrew && cd Homebrew
git clone git://mirrors.ustc.edu.cn/homebrew-core.git

# 执行更新命令
brew update

Error: 
  homebrew-core is a shallow clone.
To `brew update`, first run:
  git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
This command may take a few minutes to run due to the large size of the repository.

# 提示需要先执行如下命令
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow

# 在执行更新命令
brew update

标签:core,macOS,git,com,install,Homebrew,homebrew,安装
来源: https://www.cnblogs.com/simple-record/p/16607099.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有