I wrote a Python program before and needed to use it telnet
as a client, but when I used it on a Mac telnet
, I found that macOS High Sierra 10.13 no longer supports telnet
commands.
I try to use brew install telnet
but: 1
MacBook-Air:~ User$ brew install telnet
Updating Homebrew...
then no then
We can use the command
$ cd "$(brew --repo)"
$ git remote -v
origin https://github.com/Homebrew/brew.git (fetch)
origin https://github.com/Homebrew/brew.git (push)
Knowing that the official Homebrew source code repository address is https://github.com/Homebrew/brew.git
, it is not difficult to see that this is a GitHub repository. We know that GitHub is not fast in China, which leads to very slow updates.
So we can solve it by changing the download source to a domestic mirror.
There are more than one domestic mirrors, and the more reliable ones are:
- University of Science and Technology of China Open Source Software Mirror
- Tsinghua University Open Source Software Mirror Site
Tsinghua University open source software mirror site Homebrew mirror use help link:
- Homebrew | Help on Mirror Site | Tsinghua University Open Source Software Mirror Site | Tsinghua Open Source
Mirror - Homebrew Bottles | Mirror Site Use Help | Tsinghua University Open Source Software Mirror Site | Tsinghua Open Source Mirror
USTC Mirror Help documentation Homebrew source usage help link:
- Help with Homebrew Sources — USTC Mirror Help documentation
- Homebrew Bottles source help — USTC Mirror Help documentation
- Homebrew Core source help — USTC Mirror Help documentation
- Homebrew Cask source help — USTC Mirror Help documentation
Replace USTC mirror
Because there are many Homebrew mirrors on the HKUST Mirror Station, let's take the Homebrew mirror on the HKUST Mirror Station as an example.
- Replace the USTC mirror of the Homebrew source repository:
$ cd "$(brew --repo)"
$ git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
brew update
This will be much faster when using the command to update.
2. Replace the Homebrew core repository USTC image:
$ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
$ git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
This way, the installation will be much faster when executing the command brew install FORMULA...
& . 3. Reset to official address:brew upgrade [FORMULA...]
$ cd "$(brew --repo)"
$ git remote set-url origin https://github.com/Homebrew/brew.git
$ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
$ git remote set-url origin https://github.com/Homebrew/homebrew-core
- Lines that
$
begin with represent the command entered. ↩