找回密码
 立即注册
查看: 288|回复: 0

[简易教程] MAC 安装telnet

[复制链接]
发表于 2021-9-26 13:47 | 显示全部楼层 |阅读模式
https://www.cnblogs.com/the-fool/p/11054092.html
在10.12及以下版本,都内置了telnet命令,但是在10.13中,已经取消了



接下来给大家介绍下如何安装telnet命令:

1、打开“终端”,输入:/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)",接着输入密码,一路回车就完成了



2、完成后输入:brew help,正确输出命令提示就完成安装了。

接下来我们继续安装telnet命令:

3、输入:brew install telnet,等待完成,然后输入命令测试:telnet toutiao.com 80



通过上图可以看出来,已经成功安装,至于为什么头条返回400,是因为 我只发送了个hello,world,不是http协议的标准头。
如有报错:

根据报错提示,使用修复命令进行修复


Error: telnet: Calling `cellar` in a bottle block is disabled! Use `brew style --fix` on the formula to update the style or use `sha256` with a `cellar:` argument instead.
Please report this issue to the homebrew/core tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/telnet.rb:14

用fix命令修复:brew style --fix /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/telnet.rb



懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Unity开发者联盟 ( 粤ICP备20003399号 )

GMT+8, 2024-5-4 13:18 , Processed in 0.271632 second(s), 26 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表