如果未安装 Command Line Tools命令行工具,安装步骤如下: 在终端中输入 xcode-select --install,按提示安装完成后,重新安装tree即可。 如果安装了 Command Line Tools命令行工具,执行 sudo xcode-select --reset