brew update moved installation location from /usr/local to /usr/local/Homebrew. Unfortunately, installed cask were not moved to /usr/local/Homebrew/Caskroom, so brew cask thinks that I have no installed cask.
For example, I have installed java at usr/local/Caskroom/java/1.8.0_102-b14, but brew cask info java says that it is not installed.
Output of brew cask info java --verbose
java: 1.8.0_102-b14
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Not installed
From: https://github.com/caskroom/homebrew-cask/blob/master/Casks/java.rb
==> Name
Java Standard Edition Development Kit
==> Artifacts
JDK 8 Update 102.pkg (pkg)
==> Caveats
This Cask makes minor modifications to the JRE to prevent issues with
packaged applications, as discussed here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=411361
If your Java application still asks for JRE installation, you might need
to reboot or logout/login.
Installing this Cask means you have AGREED to the Oracle Binary Code
License Agreement for Java SE at
https://www.oracle.com/technetwork/java/javase/terms/license/index.html
Output of brew doctor
Your system is ready to brew.
Output of brew cask doctor
==> macOS Release:
10.11.6
==> Hardware Architecture:
intel-64
==> Ruby Version:
2.0.0-p648
==> Ruby Path:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
==> Homebrew Version:
Homebrew 0.9.9 (git revision 569db; last commit 2016-09-19)
Homebrew/homebrew-core (git revision 128e3; last commit 2016-09-19)
==> Homebrew Executable Path:
/usr/local/bin/brew
==> Homebrew Cellar Path:
/usr/local/Cellar
==> Homebrew Repository Path:
/usr/local/Homebrew
==> Homebrew Origin:
https://github.com/Homebrew/brew.git
==> Homebrew-Cask Version:
0.60.0 (git revision 2699; last commit 3 hours ago)
==> Homebrew-Cask Install Location:
<NONE>
==> Homebrew-Cask Staging Location:
/usr/local/Homebrew/Caskroom
==> Homebrew-Cask Cached Downloads:
/Users/milus-avs/Library/Caches/Homebrew/Cask
0 files, 0B
==> Homebrew-Cask Default Tap Path:
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask
==> Homebrew-Cask Alternate Cask Taps:
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-versions
==> Homebrew-Cask Default Tap Cask Count:
3310
==> Contents of $LOAD_PATH:
/usr/local/Homebrew/Library/Homebrew/cask/lib
/usr/local/Homebrew/Library/Homebrew
/Library/Ruby/Site/2.0.0
/Library/Ruby/Site/2.0.0/x86_64-darwin15
/Library/Ruby/Site/2.0.0/universal-darwin15
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/x86_64-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/universal-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/x86_64-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15
==> Contents of $RUBYLIB Environment Variable:
<NONE>
==> Contents of $RUBYOPT Environment Variable:
<NONE>
==> Contents of $RUBYPATH Environment Variable:
<NONE>
==> Contents of $RBENV_VERSION Environment Variable:
<NONE>
==> Contents of $CHRUBY_VERSION Environment Variable:
<NONE>
==> Contents of $GEM_HOME Environment Variable:
<NONE>
==> Contents of $GEM_PATH Environment Variable:
<NONE>
==> Contents of $BUNDLE_PATH Environment Variable:
<NONE>
==> Contents of $PATH Environment Variable:
PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services/cmd:/usr/local/Homebrew/Library/Homebrew/cask/cmd:/usr/local/Homebrew/Library/Homebrew/shims/scm"
==> Contents of $SHELL Environment Variable:
SHELL="/bin/zsh"
==> Contents of Locale Environment Variables:
LANG="pl_PL.UTF-8"
LC_CTYPE="pl_PL.UTF-8"
==> Running As Privileged User:
No
Previously installed casks are still achievable in the system, but I'm now sure if simple moving /usr/local/Caskroom/ content to /usr/local/Homebrew/Caskroom will be enough.
I noticed the same behavior just now. But I have a slightly different output for brew cask doctor
==> Homebrew-Cask Staging Location:
/usr/local/Homebrew/Caskroom (error: path does not exist)}
Because /usr/local/Homebrew/Caskroom does't exist on my machine brew cask list gives me:
Warning: nothing to list
Yes, I had the same output for brew cask doctor, but actions described in pre bug report changed that.
brew cask list also gives me the same warning, because /usr/local/Homebrew/Caskroom is empty
Yes same here. They are still in /usr/local/Caskroom/ and linked to my ~/Applications
brew cask list
Warning: nothing to list
I did not have lates xcode-cmd when brew was upgrading cask. dunno if that was issue.
So do we wait for fix or do it manually?
mv /usr/local/Caskroom /usr/local/Homebrew
for f in ~/Applications/*.app; do oldloc="$(readlink "$f")"; [[ -e $oldloc ]] || ln -sf "/usr/local${oldloc#/opt/homebrew-cask}" "$f"; done
Or should I just remove brew and everything and reinstall to new locations since this is 2nd or 3rd move in last year? (was also in /opt/homebrew-cask/Caskroom) :)
edit: locations
This should be fixed after https://github.com/Homebrew/brew/pull/1025 is merged.
Or should I just remove brew and everything and reinstall to new locations
@guycalledseven, this might be the best thing, since there is no automatic way to migrate the symlinks from the old installation behaviour.
tnx @reitermarkus will do.
Most helpful comment
@guycalledseven, this might be the best thing, since there is no automatic way to migrate the symlinks from the old installation behaviour.