4

When I try to install a new cask a message appears:

"The default Caskroom location has moved to /usr/local/Caskroom"

How to move the old directory without breaking the links to the new location?

Inanc Gumus
  • 25,195
  • 9
  • 85
  • 101

2 Answers2

9

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 information: https://github.com/caskroom/homebrew-cask/issues/21913

Inanc Gumus
  • 25,195
  • 9
  • 85
  • 101
  • 1
    Tried the first solution. After that none of the apps could be found or started. Second solution worked though. – perelin Oct 03 '16 at 08:44
  • Tried the second solution, but it tells me "No such file or directory". For some reason, it's located at /opt/homebrew/Caskroom on my system. Should I nevertheless move it to /usr/local? And would probably need to adapt the relink recipe? – Alexander Feb 03 '23 at 11:04
-1

I had same issue and i did following which 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
Satish
  • 16,544
  • 29
  • 93
  • 149
  • This is not the same issue. In the question, asked about homebrew cask not homebrew. And, the homebrew cask application path updates for a new update on homebrew cask, not homebrew itself. – Inanc Gumus Nov 18 '16 at 08:51