今天需要使用kafka,遂用公司电脑mac通过brew安装。
源已经换了,国内最常用的源中科大和清华:
https://lug.ustc.edu.cn/wiki/mirrors/help/brew.git
https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/
开始安装
brew install kafka
下载不到100%,就会因网络错误:
jiuqudembp:homebrew-core coffee$ brew install ruby ==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz Already downloaded: /Users/coffee/Library/Caches/Homebrew/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz Error: Checksum mismatch. Expected: 34ce9e4c9c1be28db564d744165aa29291426f8a3d2ef806ba4f0b9175aedb2b Actual: aad33f35a567fd7550c4811c2966256115e713e76e34cb6588d6d63a32c1e9de Archive: /Users/coffee/Library/Caches/Homebrew/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz To retry an incomplete download, remove the file above. Error: Failed to install vendor Ruby.
其实我本以为换了源,应该很快。但因为brewhome是基于ruby解析你的下载安装脚本,如果你ruby版本不对还是会国外源去下载,这时我怎么也通过不了。
但其实解决也很简单,找个迅雷或者断点续传的下载器,把这个ruby包下载下来,放在目标位置。就可以继续你原来的安装了。