4

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

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

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

4

2 回答 2

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

于 2016-09-10T21:14:29.150 回答
-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
于 2016-10-12T19:08:26.253 回答