Mac M1安装Homebrew的方法步骤
最常用命令
搜索软件: brew search 软件包名称
安装软件: brew install 软件包名称
卸载软件: brew uninstall 软件包名称
错误解决
问题1 curl: (7) Failed to connect to http://raw.githubusercontent. port 443: Connection refused” 错误
解决方法
打开 网站查询 raw.githubusercontent. 主机的真实IP
打开 /etc/hosts 文件,增加一条记录
185.199.108.133 raw.githubusercontent.
问题2 如果 brew install 出以下错误, 则安装时使用 arch -arm64 brew install 软件包名 进行安装
创建安装目录
Homebrew 安装脚本会将程序默认装至 /usr/local/Homebrew ,这是 Intel 芯片架构上的安装路径,M1芯片上则需要安装到 /opt/Homebrew/ 下。
sudo mkdir -p /opt/homebrew sudo chown -R $(whoami) /opt/homebrew
下载 homebrew 包并解压至 /opt/homebrew 目录
curl -L https://github./Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
如果下载慢,可以直接通过 或下载,copy 到 /opt 目录下再将压缩包解压到 /opt/homebrew 目录
cp /opt tar xz 压缩包名 --strip 1 -C homebrew
将路径增加到PATH环境变量中
vim ~/.bash_profile
#在 .bash_profile 中新增 export PATH=$PATH:/opt/homebrew/bin; #保存退出
#刷新生效 source ~/.bash_profile
修改源
cd "$(brew --repo)" git clone https://mirrors.ustc.edu./brew.git cd "$(brew --repo)/Library/Taps/homebrew" git clone https://mirrors.ustc.edu./homebrew-core.git git clone https://mirrors.ustc.edu./homebrew-cask.git brew update #更新
其它镜像地址:
HomeBrew 官方镜像:
brew: https://github./Homebrew/brew
core: https://github./Homebrew/homebrew-core
cask: https://github./Homebrew/homebrew-cask清华大学镜像:
brew: https://mirrors.tuna.tsinghua.edu./git/homebrew/brew.git
core: https://mirrors.tuna.tsinghua.edu./git/homebrew/homebrew-core.git
cask: https://mirrors.tuna.tsinghua.edu./git/homebrew/homebrew-cask.git中科大镜像:
brew: https://mirrors.ustc.edu./brew.git
core: https://mirrors.ustc.edu./homebrew-core.git
cask: https://mirrors.ustc.edu./homebrew-cask.git
终于可以进行下载软件了
brew install -s 软件包名
到此这篇关于Mac M1安装Homebrew的方法步骤的文章就介绍到这了,更多相关M1安装Homebrew内容请搜索狼蚁SEO以前的文章或继续浏览狼蚁网站SEO优化的相关文章希望大家以后多多支持狼蚁SEO!
编程语言
- 宿迁百度关键词排名指南:实现精准营销的关键
- 四川SEO优化怎么做网络推广
- 立昂技术备案老域名收购:如何为您的业务赋能
- 安徽百度关键词seo贵不贵,一般需要多少钱
- 吉林百度快照排名怎么做电话营销
- 多伦新手做SEO怎么做
- 甘肃优化关键词排名推广怎么做论坛营销
- 沙雅SEO网站推广:提升您的在线可见性
- 四川SEO优化如何提升销售额和销售量
- 聂荣网站排名优化:提升网站可见性的全方位指
- 涞水SEO:提升地方企业在线可见性的策略
- 辽宁百度seo排名怎样做网站排名
- 临湘哪有关键词排名优化:提升网站可见度的关
- 黑龙江百度网站优化有没有优惠
- 凉城优化关键词排名推广:提升您的网络可见性
- 萝北整站优化:提升您网站流量和排名的全面指