通过 brew install telnet 时会要求安装 xcode
brew install telnet Warning: No remote 'origin' in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services, skipping update! Running `brew update --auto-update`... ==> Auto-updated Homebrew! Updated 3 taps (homebrew/cask-versions, homebrew/core and homebrew/cask). You have 11 outdated formulae installed. You can upgrade them with brew upgrade or list them with brew outdated. Warning: You are using macOS 10.14. We (and Apple) do not provide support for this old version. You will encounter build failures with some formulae. Please create pull requests instead of asking for help on Homebrew's GitHub, Twitter or any other official channels. You are responsible for resolving any issues you experience while you are running this old version. telnet: A full installation of Xcode.app is required to compile this software. Installing just the Command Line Tools is not sufficient. Xcode can be installed from the App Store. Error: telnet: An unsatisfied requirement failed this build.
如果不想安装xcode 可用下面方式安装
从地址: https://ftp.gnu.org/gnu/inetutils/ 下载某个版本, 例如: inetutils-2.3.tar.xz
然后解压
tar -zxf inetutils-2.3.tar.xz cd inetutils-2.3 make -j8 ## 报错可不管 sudo make install ## 最后验证安装结果 telnet --version
个人博客: https://lanxy.top