Mac默認沒帶telnet命令
zsh: command not found: ternet
$ brew install telnet
需要安裝brew
官網:https://brew.sh/#install
複製安裝命令執行:
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
報錯:(Failed to connect to raw.githubusercontent.com port 443: Connection refused)
在https://www.ipaddress.com/查詢raw.githubusercontent.com的真實IP
raw.githubusercontent.com resolves to the following 4 IPv4 addresses:
185.199.108.133
185.199.109.133
185.199.110.133
185.199.111.133
修改hosts
sudo vim /etc/hosts
添加這行記錄185.199.110.133 raw.githubusercontent.com
再次執行:/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
還是報錯:curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443
使用國內鏡像安裝brew
/bin/bash -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
請選擇一個下載鏡像,例如中科大,輸入1回車。
源有時候不穩定,如果git克隆報錯重新運行腳本選擇源。cask非必須,有部分人需要。
1、中科大下載源 2、清華大學下載源 3、北京外國語大學下載源 4、騰訊下載源(不推薦) 5、阿里巴巴下載源(不推薦 缺少cask源)
請輸入序號: 1
你選擇了中國科學技術大學下載源
!!!此腳本將要刪除之前的brew(包括它下載的軟件),請自行備份。
->是否現在開始執行腳本(N/Y) Y
安裝ternet
brew install telnet