怎么在Mac M1中安装家酿

  介绍

怎么在Mac M1中安装家酿?针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。

常用命令

搜索软件:酿造搜索软件包名称

安装软件:酿造安装软件包名称

卸载软件:酿造卸载软件包名称

错误解决

<强>问题1:curl: http://raw.githubusercontent.com(7)未能连接到端口443:拒绝连接”错误

<强>解决方法:

打开www.ipaddress.com网站查询raw.githubusercontent.com <强> 主机的真实IP

怎么在Mac M1中安装家酿

打开/etc/hosts文件,增加一条记录

185.199.108.133 , raw.githubusercontent.com

<强>问题2:强如果酿造出安装以下错误,则安装时使用弓-arm64酿造安装软件包名进行安装

怎么在Mac M1中安装家酿

创建安装目录

家酿安装脚本会将程序默认装至/usr/local/Homebrew,这是英特尔芯片架构上的安装路径,M1芯片上则需要安装到/opt/组装/下。

sudo  mkdir  -p /opt/家酿   sudo  chown  -R  $ (whoami),/opt/家酿

下载自制程序包并解压至/opt/家酿目录

curl  -L  https://github.com/Homebrew/brew/tarball/master  |, tar  xz ——strip  1, -C 家酿

如果下载慢,可以直接通过https://github.com/Homebrew/brew/tarball/master或本地下载,复制到/opt目录下再将压缩包解压到/opt/家酿目录

cp /选择   tar  xz 压缩包名,——strip  1, -C 家酿

将路径增加到路径环境变量中

vim  ~/ash_profile #在,.bash_profile 中新增   export 路径=$路径:/opt/组装/bin;   #保存退出 #刷新生效   source  ~/ash_profile

修改源

cd “$ (brew ——回购)“;   git  clone  https://mirrors.ustc.edu.cn/brew.git   ,   ,   cd “$ (brew ——回购)/图书馆/阀门/homebrew"   ,   git  clone  https://mirrors.ustc.edu.cn/homebrew-core.git   ,   git  clone  https://mirrors.ustc.edu.cn/homebrew-cask.git   ,   brew  update  #更新

其它镜像地址:

家酿官方镜像:
酿造:https://github.com/Homebrew/brew
的核心:https://github.com/Homebrew/homebrew-core
桶:https://github.com/Homebrew/homebrew-cask

清华大学镜像:
酿造:https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
的核心:https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
桶:https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git

中科大镜像:
酿造:https://mirrors.ustc.edu.cn/brew.git
的核心:https://mirrors.ustc.edu.cn/homebrew-core.git
桶:https://mirrors.ustc.edu.cn/homebrew-cask.git

终于可以进行下载软件了

brew  install  -s 软件包名

关于怎么在Mac M1中安装家酿问题的解答就分享到这里了,希望以上内容可以对大家有一定的帮助,如果你还有很多疑惑没有解开,可以关注行业资讯频道了解更多相关知识。

怎么在Mac M1中安装家酿