默认的Caskroom位置已移至/ usr / local / Caskroom

时间:2016-09-10 21:14:29

标签: homebrew homebrew-cask

当我尝试安装新的cask时,会出现一条消息:

"默认的Caskroom位置已移至/ usr / local / Caskroom"

如何在不破坏指向新位置的链接的情况下移动旧目录?

2 个答案:

答案 0 :(得分:9)

配方

# FIRST SOLUTION

# reinstall all casks (can be slow)
brew cask install --force $(brew cask list)

# --------------------------------------

# SECOND SOLUTION

# move cask directory to its new location
mv /opt/homebrew-cask/Caskroom /usr/local

# relink existing casks to the new location
for f in ~/Applications/*.app; do oldloc="$(readlink "$f")"; [[ -e $oldloc ]] || ln -sf "/usr/local${oldloc#/opt/homebrew-cask}" "$f"; done
  

有关详细信息,请参阅此处:https://github.com/caskroom/homebrew-cask/issues/21913

答案 1 :(得分:-1)

我有同样的问题,我做了以下修复它。

1

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null

2

MBP:~$ brew install terraform
==> Downloading https://homebrew.bintray.com/bottles/terraform-0.7.5.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring terraform-0.7.5.el_capitan.bottle.tar.gz
==> Caveats
zsh completion has been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
  /usr/local/Cellar/terraform/0.7.5: 4 files, 123.3M