记录用Homebrew安装软件的一次坑
就以我安装jenkins为例,根据官网的操作步骤,在terminal中执行brew install jenkins. 就这么一个简单步骤,让我捣鼓了一下午才找到解决方案。正常来说执行完不报错就OK了,可是我会报错
tar: Error opening archive: Failed to open '/Users/c5328830/Library/Caches/Homebrew/downloads/e84711e684aa84f6ec13ed1100c6460f26f44ed0b2b2c70d23183647bfa4e758--openjdk@11-11.0.10.big_sur.bottle.tar.gz'
Error: Failure while executing; `tar --extract --no-same-owner --file /Users/c5328830/Library/Caches/Homebrew/downloads/e84711e684aa84f6ec13ed1100c6460f26f44ed0b2b2c70d23183647bfa4e758--openjdk@11-11.0.10.big_sur.bottle.tar.gz --directory /private/tmp/d20210810-19175-1wk7d6b` exited with 1. Here's the output:
tar: Error opening archive: Failed to open '/Users/c5328830/Library/Caches/Homebrew/downloads/e84711e684aa84f6ec13ed1100c6460f26f44ed0b2b2c70d23183647bfa4e758--openjdk@11-11.0.10.big_sur.bottle.tar.gz'
Google 百度都找不到相关解决方案。。。。
崩溃中。。。。
搜啊搜。
皇天不负有心人。。。
终于搜到了
原来我安装homebrew的时候,使用的是国内镜像版。。。。
是bintray要关闭了。
而Homebrew社区对这个其实是已经做了准备的,新版的homebrew程序已经去除了bintray相关,镜像版,目前没有解决。。。
解决办法:
去掉国内镜像的设置:export HOMEBREW_BOTTLE_DOMAIN=’’,这是临时去除,如果要永久去除,修改配置文件
zsh是~/.zprofile文件,bash是 ~/.bash_profile文件
bash要修改~/.bash_profile文件
参考:https://www.tinkol.com/372