1. brew install tree
运行以上命令安装tree,报错如下图,
curl: (22) The requested URL returned error: 410 Gone
![](https://img.haomeiwen.com/i4403589/505e0c164a77719e.png)
命令行中执行ping github.com,连接超时,解决方法:更改hosts文件
![](https://img.haomeiwen.com/i4403589/59bdb609e3645136.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 命令乱码问题
![](https://img.haomeiwen.com/i4403589/87ca3ed9f86116ed.png)
直接运行tree -N,解决
![](https://img.haomeiwen.com/i4403589/8b0ba0c945b05a50.png)
网友评论