introduce

Homebrew is a package management tool that currently supports macOS and Linux.

Because the official download address, often install after waiting for a period of time encountered the following prompt

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"/ / error curl: (7) Failed to connect to port 443 raw.githubusercontent.com: Operation timed outCopy the code

So I went to see their source code, although not very understand, but find the problem.

Because raw.githubusercontent.com is not very stable, we can’t often easy to visit mainland China users to access the resources.

Why is it that the official can solve this problem with a free CDN like JSDelivr?

So based on the official source code, modify the switch to raw.githubusercontent.com USTC mirror, measurement speed is good, ha ha rest assured to eat.

Fast installation

Choose one of them to install.

JSDelivr

/bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/qqlcx5/homebrew/install.sh)"
Copy the code

Yards cloud

/bin/bash -c "$(curl -fsSL https://gitee.com/qqlcx5/homebrew/raw/master/install.sh)"
Copy the code

Common commands

  • brew helpSee the help
  • brew listLists the installed software packages
  • brew install <package name>Installing software Packages
  • brew uninstall <package name>Uninstalling software Packages
  • brew search <package name>Finding software packages
  • brew info <package name>Viewing Software Package Information
  • brew -vTo viewbrewversion
  • brew updateupdatebrew
  • brew outdatedLists the software packages that need to be updated
  • brew upgrade [<package name>]It is optional to update a software package. By default, all software packages are updated

uninstall

JSDelivr

/bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/qqlcx5/homebrew/uninstall.sh)"
Copy the code

Yards cloud

/bin/bash -c "$(curl -fsSL https://gitee.com/qqlcx5/homebrew/raw/master/uninstall.sh)"
Copy the code

The last

If you have any problems at work, doubts in the interview, or obstacles in the front end, you can join our front End Youdao Family. I will try my best to answer your questions and solve your doubts, so that we can work together and grow together.