发现/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core目录是空的
然后执行下面的代码,wget终于安装成功了
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core git clone https://github.com/Homebrew/homebrew-core.git brew update brew install wget
wget安装过程遇到几次超时,重试即可
/usr/local/Homebrew/Library/Taps/homebrew/目录下有三个目录,如下:
16:12:50 xxx ~ $ ll /usr/local/Homebrew/Library/Taps/homebrew/ total 0 drwxr-xr-x 17 lipengfei admin 544 7 23 15:53 homebrew-cask drwxr-xr-x 16 lipengfei admin 512 7 23 15:51 homebrew-core drwxr-xr-x 13 lipengfei admin 416 7 23 15:53 homebrew-services
三个软件在github上都有,https://github.com/Homebrew
16:16:32 xxx /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask $ git remote -v origin https://github.com/Homebrew/homebrew-cask (fetch) origin https://github.com/Homebrew/homebrew-cask (push) 16:16:57 xxx /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask $ cd ../homebrew-services/ 16:17:05 xxx /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services $ git remote -v origin https://github.com/Homebrew/homebrew-services (fetch) origin https://github.com/Homebrew/homebrew-services (push) 16:17:07 xxx /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services $ cd ../homebrew-core/ 16:17:10 xxx /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core $ git remote -v origin https://github.com/Homebrew/homebrew-core.git (fetch) origin https://github.com/Homebrew/homebrew-core.git (push)
如果有异常删除目录重新下载就行
参考:
https://segmentfault.com/a/1190000040079396