After using migration assistant to move from my MacBook Pro 2018 I5 to the new MacBook Pro 2020 M1, I tried to run R at the command line simply with R
and got the errors:
/usr/local/bin/R: line 271: /usr/local/Cellar/r/4.0.3/lib/R/bin/exec/R: Bad CPU type in executable
/usr/local/bin/R: line 271: /usr/local/Cellar/r/4.0.3/lib/R/bin/exec/R: Undefined error: 0
I tried:
sudo rm -rf /Applications/R.app
sudo rm -rf /Library/Frameworks/R.framework
sudo rm /usr/bin/{R,Rscript}
sudo rm -rf /usr/local/bin/R
and successfully removed R, showing:
zsh: command not found: R
I then tried to reinstall R with homebrew, but got errors such as:
Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)!
Please create a new installation in /opt/homebrew using one of the
"Alternative Installs" from:
https://docs.brew.sh/Installation
You can migrate your previously installed formula list with:
brew bundle dump
Error: Git must be installed and in your PATH!
Error: homebrew/science was deprecated. This tap is now empty and all its contents were either deleted or migrated.