M1 Mac installs Homebrew
Mainly refer to the use of installation process
Main reference
https://sspai.com/post/63935
https://github.com/mikelxc/Workarounds-for-ARM-mac
Main strategy: Install ARM version and X86 version of Homebrew respectively, and in.zshrc through alias name, respectively, to achieve coexistence and specify calls.
The installation process
First install M1 version of BREW, there is no official installation script.
Can focus on website https://brew.sh/
and M1 version homebrew problem summary posted at https://github.com/Homebrew/brew/issues/7857
cd /opt # Switch to the /opt directory
mkdir homebrew # Create the homebrew directory
curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
Then write the environment variable of ZSH (assuming ZSH is used)
vim ~/.zshrc
#Write at the beginning
export PATH="/opt/homebrew/bin:$PATH"
Vim basic operation:
- i——insert:w——write(save):q——quit
Install an x86 version of HomeBrew for later use
#Open a new page of zsh
arch -x86_64 $SHELL
#homebrew official install script
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Write environment variables
vim ~/.zshrc
#Write after
export PATH="/usr/local/bin:$PATH"
Let the two coexist with Alias
vim ~/.zshrc
#Write after
alias abrew='/opt/homebrew/bin/brew' # ARM Homebrew
alias ibrew='arch -x86_64 /usr/local/bin/brew' # X86 Homebrew
usage
In ZSH, input such as “Abrew List” to call ARM BREW under OPT and input “iBREW List” to call X86 BREW under USR /local. The PATH of ARM BREW is in front, so the input of “BREW List” calls ARM BREW by default. When there is a package with the same name in the two BREWS, the default priority is to call ARM BREW under the bin.
Read More:
- Mac: How to Install homebrew, nginx, PHP and MySQL
- Solution to the problem of installing Tkinter module in MAC
- How to Install MongoDB Community Edition Manually on mac and linux
- Mac monterey Reinstall System Error: pkdownloaderror 8
- Mac: How to installs docker through brew
- How to uninstall Maya on a Mac
- Error in PostgreSQL installation of win10
- FreeSWITCH installation error “You must install libyuv-dev to build mod_fsv” solution
- Bid for Kirin (Linux kernel) 7.0 compiler and installation sdl2.0 and QT using sdl2
- Install MySQL ODBC connector prompt error 1918 perfect solution (non installation of VC + + library method)
- How to Fix creating process error during software installation
- How to solve the error of “failed to create the Java virtual machine” in installing eclipse 2020-03 in MAC environment
- Automatic installation of NVIDIA 3090 video card driver
- [Solved] gocad2017 Install error: The installation of MSVC_2010_SP1_x64_32bit has failed.
- Ubuntu14.04 installation error: no such partition
- Python installation of third-party libraries reported an error: “these packages do not match the hashes from the requirements file.”
- Ruby Install Error running ‘requirements_osx_brew_update_system ruby-2.3.1
- Clion installing glfw_Using clion to configure Vulkan development environment on MacOS
- How to Use pychar to run tensorflow and virtualenv (How to install tensorflow)
- How to install PIL in Python 3