Homebrew domestic source installation

Homebrew domestic automatic installation

New beginning, come on

Script installation command:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

Script uninstall command:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh)"

Common error description:
0, Mac 10.11 system version and below (including 10.11), brew has officially stopped supporting such old systems.

1. If you encounter a problem with errno 54/443 / in the error report:

There is no problem after this general switching source, because they are all public service servers, which are very unstable.

2. It fails after detecting that you are not the latest system and you need to automatically upgrade Ruby:
rm -rf /Users/$(whoami)/Library/Caches/Homebrew/
brew -v

3. If an error is reported command not found: brew

First run the following command to see if the version number of Homebrew can be found (see the bottom 3 sentences for the result)

/usr/local/Homebrew/bin/brew -v
and then run the code that sets the temporary PATH:
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
brew -v

if you can Use is the computer PATH configuration problem, restart the terminal and run echo $PATH to print it out and analyze it yourself.

4. If brew -v does not report an error, brew update is wrong:
this does not affect the use. Trying to run brew update again may catch up with the moment when the server is unstable.
5. Brew has a self-check program. If there is a problem, try the self-check:
/usr/local/bin/brew doctor
prompts http://github.com address problem don’t care, because it has been changed to a domestic address, so warn ⚠️

6、Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.

The reason is that the su command has been executed, the account has been switched to root authority, and the root authority can be exited.
Generally, you can close the terminal and reopen it, or enter the command exit to enter or su-username.

Reprinted peace of knowing: Taurus Chaumat

Author original address

Guess you like

Origin blog.csdn.net/MevenS7/article/details/108429490