I encountered some problems when installing Homebrew, record them for easy reference. Homebrew is a software package management tool based on the Mac OS platform. It has many practical functions such as installation, uninstallation, update, view, search and so on. Package management can be implemented with a simple command, and you don’t have to worry about dependencies and file paths. It is very convenient and quick. More information can be found at sspai.com/post/42924
installation
Copy the following commands from the official website and run them on the terminal. Super simple? Ha ha ha (wry smile)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Copy the code
Problems encountered
1, Failed to connect to raw.githubusercontent.com
Don’t have access to raw.githubusercontent.com, aiming at this problem, can modify the hosts.
1) Query the real IP address
By visitingwww.ipaddress.com/Enter raw.githubusercontent.com queries to the real IP address.
2) Modify hosts
Access the edit hosts file
sudo vi /etc/hosts
Copy the code
Add the following content to save
199.232.4.133 raw.githubusercontent.com
Copy the code
See www.ioiox.com/archives/62…
The terminal runs the preceding installation command again and displays Error: Checksum Mismatch.
2, Error: Checksum mismatch
Delete the above files and run the install command again. See apple.stackexchange.com/questions/7…
Stackoverflow.com/questions/6…
Rm/Users/wenxiu/Library/Caches/Homebrew/portable - ruby - 2.6.3 _2. Yosemite. Bottle. Tar. GzCopy the code
Finally, the installation was successful.
Conclusion:
1) The best way to install is to go directly to the official website to provide a solution
2) Problems in the installation process, although most of them are stepped on by predecessors, but some solutions are not necessarily able to solve your problems, you can only try more until you find the right solution