Installing Homebrew on a Mac using image resources can be done through the following steps
-
Open the Terminal application.
-
Enter the following command and press Enter to replace Homebrew's git repository with Tsinghua University's mirror repository:
/bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install.sh)"
Or use the mirror warehouse of the University of Science and Technology of China:
/bin/bash -c "$(curl -fsSL https://mirrors.ustc.edu.cn/homebrew-install/install.sh)"
-
Wait for the installation process to complete, it may take some time depending on your internet speed and the performance of your Mac.
-
Once the installation is complete, you can verify that Homebrew was successfully installed by typing:
brew doctor
- If you don't see any errors, Homebrew has been successfully installed.
Once Homebrew is installed, you can use it to install various Mac packages and tools, including development tools, applications, command-line tools, and more. For example, you can use the following command to install Node.js:
brew install node
After the installation is complete, you can use Node.js in the terminal for development and testing.