Mac OS 10.13.1 以后无法使用telnet命令

Mac OS 10.13.1后删除了telnet命令,telnet是明文密码所以为了安全起见,苹果就取消这个了。
好了我们来解决这个问题:

首先我们直接安装telnet
//在终端输入
brew install telnet

然而我却安装失败了, 提示“No available formula with the name "telnet" ”
C0199BD4-F5A3-4872-8498-88D4CFE2CC79.png
这是没有安装Homebrew造成的

Homebrew — OS X 不可或缺的套件管理器

我们也可以终端输入
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

进行安装,但是安装过程中又出现了问题
196101AF-E2A0-44CD-98BC-9CC4FB1875BE.png

/usr/local/Cellar is not writable. You should change the ownership and permissions of /usr/local/Cellar back to your user account 这时候按照它的的提示做就OK,终端输入

sudo chown -R $(whoami) /usr/local/Cellar

本以为OK了又报错:
Mac OS 10.13.1 以后无法使用telnet命令_第1张图片
7E930F98-621B-4FB9-8BC5-DA7EE5F32DA3.png
Already up-to-date.
Error: Could not link:
/usr/local/share/man/man1/brew.1

Please delete these paths and run `brew update`.
Error: Could not link:
/usr/local/share/doc/homebrew

那我们就终端删除这几个文件:

jiangs:~ liangc$ rm /usr/local/share/man/man1/brew.1
override rw-rw-r--  root/wheel for /usr/local/share/man/man1/brew.1? y
jiangs:~ liangc$ rm -rf /usr/local/share/doc/homebrew

报错Permission denied无权限删除homebrew文件夹,我们来提权
Mac OS 10.13.1 以后无法使用telnet命令_第2张图片
8FDA1E13-E30F-4DAD-BF90-EDFB97FD822C.png

终端输入

sudo chmod -R 777 /usr/local/share/doc/homebrew

然后终端执行

jiangs:homebrew liangc$ rm -rf /usr/local/share/doc/homebrew
jiangs:homebrew liangc$ ruby -e "$(curl -fsSL --insecure https://raw.githubusercontent.com/Homebrew/install/master/install)"

OK成了,我们来安装吧

brew install telnet

爆爆爆爆错啦
Mac OS 10.13.1 以后无法使用telnet命令_第3张图片
AAD72E8F-815A-4CE0-9C9E-F18090A7094F.png

快去更新XCode吧!

你可能感兴趣的:(Mac OS 10.13.1 以后无法使用telnet命令)