Brew 安装报错 The arm64 architecture is required for this software.

今天安装 Mactop 时,brew 报错了
在这里插入图片描述
Brew 我装了很多年了,系统是从之前 Intel 芯片的 Mac 迁移过来,需要更新一下,运行以下 shell 升级脚本,升级完成之后安装成功。

## Migrating Homebrew from Intel to M1

## You can copy and paste into the Terminal

## Go to home directory
cd ;

## Create list of installed Intel packages
brew bundle dump ;

## Install new version of Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" ;

## Update the PATH to point to M1 version first
eval "$(/opt/homebrew/bin/brew shellenv)" ;
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc ;

## Migrate Intel packages (/usr/local/bin/brew) to M1 (/opt/Homebrew)
## You may need to enter your sysadmin password
brew bundle --file Brewfile ;

## Update packages
brew update ; 

## Upgrade packages
brew upgrade ;

## Clean up
brew cleanup ;

## Uninstall old Intel version

# Download uninstall script
curl -fsSL -o ./uninstall.sh https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh ;

# Run the uninstall specifying the old path
sudo /bin/bash ./uninstall.sh --path=/usr/local ;
# Enter password
# Type Y to uninstall

# Delete uninstall script
rm uninstall.sh ;

# Final cleanup
brew cleanup ;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值