By default, the Caskroom location has moved to / usr / local / Caskroom

When I try to install a new box, a message appears:

"By default, the Caskroom location has moved to / usr / local / Caskroom"

How to move an old directory without breaking links to a new location?

+4
source share
2 answers

Recipe

# 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

See here for more info: https://github.com/caskroom/homebrew-cask/issues/21913

+9
source

I had the same problem, and I did, after which I fixed it.

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
-1
source

Source: https://habr.com/ru/post/1654238/


All Articles