1. brew install tree
运行以上命令安装tree,报错如下图,
curl: (22) The requested URL returned error: 410 Gone
image.png
命令行中执行ping github.com,连接超时,解决方法:更改hosts文件
image.png
sudo vim /etc/hosts,在文件末添加一下配置
192.168.1.11 github.com git
13.250.177.223 github.global.ssl.fastly.net
第一行为本地IP地址
第二行为ping github.com显示的IP地址
hosts更改完成,再执行brew install tree,安装成功。
2.tree 命令乱码问题
image.png
直接运行tree -N,解决
image.png