网站建设怎样创建链接,西安网络seo公司,番禺招聘网最新信息,网络推广合同范本准备
ARM版Homebrew需要安装在/opt/homebrew路径下#xff0c;早期的时候需要手动创建目录执行命令#xff0c;目前使用最新脚本不需要手动操作。
/bin/bash -c $(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)然后还需设置环境…准备
ARM版Homebrew需要安装在/opt/homebrew路径下早期的时候需要手动创建目录执行命令目前使用最新脚本不需要手动操作。
/bin/bash -c $(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)然后还需设置环境变量具体操作步骤如下一定要仔细阅读。
PS: 终端类型根据执行命令echo $SHELL显示的结果
/bin/bash bash .bash_profile/bin/zsh zsh .zprofile
从macOS Catalina(10.15.x) 版开始Mac使用zsh作为默认Shell使用.zprofile所以对应命令
echo eval $(/opt/homebrew/bin/brew shellenv) ~/.zprofile
eval $(/opt/homebrew/bin/brew shellenv)安装 X86 版 Homebrew
因为目前很多软件包没有支持ARM架构我们也可以考虑使用x86版的Homebrew。
在命令前面添加arch -x86_64就可以按X86模式执行该命令比如
arch -x86_64 /bin/bash -c $(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)source ~/.zprofile设置镜像
注意本文中的安装脚本会设置中科大源镜像如果你也想设置cask和bottles的镜像请按下面注释部分选择执行代码。
更详细的教程可以参考前面「mac下镜像飞速安装Homebrew教程」
执行时根据实际情况修改$(brew --repo)代码中的brew。
意思是如果你只是使用一个版本Homebrew直接执行命令即可如果你想多个版本共存或者使用了别名就把brew关键字替换为别名名称如前面的abrew、ibrew。
brew git -C “$(brew --repo)” remote set-url origin https://mirrors.ustc.edu.cn/brew.git
core git -C “$(brew --repo homebrew/core)” remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
cask git -C “$(brew --repo homebrew/cask)” remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
bottles for zsh 和下面2选1 echo ‘export HOMEBREW_BOTTLE_DOMAINhttps://mirrors.ustc.edu.cn/homebrew-bottles/bottles’ ~/.zprofile source ~/.zprofile
bottles for bash 和上面2选1 echo ‘export HOMEBREW_BOTTLE_DOMAINhttps://mirrors.ustc.edu.cn/homebrew-bottles/bottles’ ~/.bash_profile source ~/.bash_profile
常用命令
brew -v 查询HomeBrew版本brew -h brew帮助brew update 更新Homebrewbrew install pkg_name 安装任意软件brew uninstall pkg_name 卸载任意软件brew search pkg_name 查询任意包brew list 列出已安装的软件列表brew list git 列出已安装软件git的文件目录brew info pkg_name 查看任意包内容信息brew upgrade pkg_name 更新任意包brew cleanup pkg_name 删除具体旧软件brew cleanup 删除所有旧软件brew outdated 已安装的包是否需要更新brew deps 已安装的包是否需要更新
HomeBrew安装node.js
brew install node node -v可能出现的报错
Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)
解决方法
eval $(/opt/homebrew/bin/brew shellenv)参考文章
M1芯片Mac上Homebrew安装教程
mac下镜像飞速安装Homebrew教程