Homebrew-cask: brew cask install returns "Error: MethodDeprecatedError"

Created on 12 Mar 2018  路  19Comments  路  Source: Homebrew/homebrew-cask

General troubleshooting steps

  • [x] I have retried my command with --force and the issue is still present.
  • [x] I have checked the instructions for reporting bugs (or making requests) before opening the issue.

    • [x] None of the templates was appropriate for my issue, or I鈥檓 not sure.

  • [ x I ran brew update-reset && brew update and retried my command.
  • [x] I ran brew doctor, fixed as many issues as possible and retried my command.
  • [x] I understand that if I ignore these instructions, my issue may be closed without review.

Description of issue

After the fix from #44694 I am now seeing a different error when running brew cask install <caskname> - Error: MethodDeprecatedError.

I ran the following commands:

$ export HOMEBREW_DEVELOPER=1
$ brew update
Updated Homebrew from b067700f to 254ce8bb.
No changes to formulae.

Output of your command with --verbose --debug

$ brew cask install node --debug --verbose
Error: MethodDeprecatedError

Output of brew cask doctor

$ brew cask doctor
Error: MethodDeprecatedError

Most helpful comment

  1. It only happened with brew cask commands.
  2. brew tap had the usual caskroom/cask and homebrew/core BUT it also had the phinze/cask

That's when I realized that even though Homebrew itself was up-to-date that the setup must have been very old on that El Capitan machine. I ran this command and suddenly everything worked again.

Thank you for helping me on the right track! 馃槜 I hope it helps the others as well.

All 19 comments

Please run brew update-reset && brew update and post the output.

Here is the output (already ran it before posting this issue):

$ brew update-reset && brew update
==> Fetching /usr/local/Homebrew...

==> Resetting /usr/local/Homebrew...
Branch master set up to track remote branch master from origin.
Reset branch 'master'

==> Fetching /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask...

==> Resetting /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask...
Branch master set up to track remote branch master from origin.
Reset branch 'master'
Your branch is up-to-date with 'origin/master'.

==> Fetching /usr/local/Homebrew/Library/Taps/caskroom/homebrew-versions...

==> Resetting /usr/local/Homebrew/Library/Taps/caskroom/homebrew-versions...
Branch master set up to track remote branch master from origin.
Reset branch 'master'
Your branch is up-to-date with 'origin/master'.

==> Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...

==> Resetting /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
Branch master set up to track remote branch master from origin.
Reset branch 'master'
Your branch is up-to-date with 'origin/master'.

==> Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-dupes...

==> Resetting /usr/local/Homebrew/Library/Taps/homebrew/homebrew-dupes...
Branch master set up to track remote branch master from origin.
Reset branch 'master'
Your branch is up-to-date with 'origin/master'.

==> Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-php...

==> Resetting /usr/local/Homebrew/Library/Taps/homebrew/homebrew-php...
Branch master set up to track remote branch master from origin.
Reset branch 'master'
Your branch is up-to-date with 'origin/master'.

==> Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-versions...

==> Resetting /usr/local/Homebrew/Library/Taps/homebrew/homebrew-versions...
Branch master set up to track remote branch master from origin.
Reset branch 'master'
Your branch is up-to-date with 'origin/master'.

Already up-to-date.

Just to note that this isn't completely isolated, I'm having the same issue here. OSX 10.13.3, fully patched, etc...

Providing the same output as requested above, though I'm not sure this adds anything new:

$ brew doctor
Your system is ready to brew.
$ brew cask doctor
Error: MethodDeprecatedError
$ brew update-reset
==> Fetching /usr/local/Homebrew...

==> Resetting /usr/local/Homebrew...
Branch 'master' set up to track remote branch 'master' from 'origin'.
Reset branch 'master'
Your branch is up to date with 'origin/master'.

==> Fetching /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask...

==> Resetting /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask...
Branch 'master' set up to track remote branch 'master' from 'origin'.
Reset branch 'master'
Your branch is up to date with 'origin/master'.

==> Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...

==> Resetting /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
Branch 'master' set up to track remote branch 'master' from 'origin'.
Reset branch 'master'
Your branch is up to date with 'origin/master'.

$ brew update
Already up-to-date.

There鈥檚 no node cask in any official repo. If you have one, you鈥檙e accessing it from an unofficial tap and need to complain to its owner.

Hey @vitorgalvao it is just a placeholder, the actual command was:

$ brew cask install microsoft-office --verbose --debug
Error: MethodDeprecatedError

As another example, brew cask info $caskname ought to work...

$ brew search google-chrome
==> Searching local taps...
==> Searching taps on GitHub...
caskroom/cask/google-chrome              caskroom/versions/google-chrome-canary
caskroom/versions/google-chrome-beta     caskroom/versions/google-chrome-dev
==> Searching blacklisted, migrated and deleted formulae...
$ brew cask info google-chrome
Error: MethodDeprecatedError

This now occurs to me on macOS 10.11.6, but not on 10.13.3 (every cask fails with this error). No luck in getting a backtrace yet.

Using homebrew 1.5.10 and it also happens on homebrew master (currently on 8e568).

  1. Does this happen with brew commands as well, or only with brew cask commands?
  2. What鈥檚 the result of brew tap?
  1. It only happened with brew cask commands.
  2. brew tap had the usual caskroom/cask and homebrew/core BUT it also had the phinze/cask

That's when I realized that even though Homebrew itself was up-to-date that the setup must have been very old on that El Capitan machine. I ran this command and suddenly everything worked again.

Thank you for helping me on the right track! 馃槜 I hope it helps the others as well.

I'm using macOS 10.13.3 and i'm on 1.5.10-37-gefe07f4. It' still happening, even it tried to run the command from the comment above.
it occurs only with brew cask commands.
Brew tap is working fine. Here is the the out put of brew tap:
atlassian/tap
caskroom/cask
homebrew/boneyard
homebrew/bundle
homebrew/completions
homebrew/core
homebrew/dupes
homebrew/services
homebrew/versions
pivotal/tap

@halo 's fix didn't work for me, still seeing the Error. Updated brew:

$ brew --version
Homebrew 1.5.11
Homebrew/homebrew-core (git revision b5e4; last commit 2018-03-20)

Try brew untap caskroom/cask && brew tap caskroom/cask.

No joy here.

$ brew update
Updated 2 taps (homebrew/core, caskroom/cask).
==> New Formulae
[email protected]
==> Updated Formulae
diff-pdf                  jenkins                   pdftoedn                  pdftoipe                  poppler

$ brew --version
Homebrew 1.5.11
Homebrew/homebrew-core (git revision 3e2775; last commit 2018-03-20)

$ brew tap
caskroom/cask
homebrew/core

$ brew untap caskroom/cask
Untapping caskroom/cask... (4,295 files, 62.5MB)
Untapped 0 formulae

$ brew tap caskroom/cask
==> Tapping caskroom/cask
Cloning into '/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask'...
remote: Counting objects: 4041, done.
remote: Compressing objects: 100% (4004/4004), done.
remote: Total 4041 (delta 37), reused 917 (delta 33), pack-reused 0
Receiving objects: 100% (4041/4041), 1.39 MiB | 9.58 MiB/s, done.
Resolving deltas: 100% (37/37), done.
Tapped 0 formulae (4,050 files, 4.3MB)

$ brew update
Already up-to-date.

$ brew search google-chrome
==> Searching local taps...
==> Searching taps on GitHub...
caskroom/cask/google-chrome                                       caskroom/versions/google-chrome-canary
caskroom/versions/google-chrome-beta                              caskroom/versions/google-chrome-dev
==> Searching blacklisted, migrated and deleted formulae...

$ brew cask info google-chrome
Error: MethodDeprecatedError

@vitorgalvao doesn't work for me - here's the output:

$ brew untap caskroom/cask && brew tap caskroom/cask
Untapping caskroom/cask... (4,427 files, 78.7MB)
Untapped 0 formulae
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
diff-pdf                                           pdftoedn                                           pdftoipe                                           poppler

==> Tapping caskroom/cask
Cloning into '/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask'...
remote: Counting objects: 4041, done.
remote: Compressing objects: 100% (4004/4004), done.
remote: Total 4041 (delta 37), reused 917 (delta 33), pack-reused 0
Receiving objects: 100% (4041/4041), 1.39 MiB | 2.00 MiB/s, done.
Resolving deltas: 100% (37/37), done.
Tapped 0 formulae (4,050 files, 4.3MB)
$ brew cask install google-chrome
Error: MethodDeprecatedError

I noticed that I had this problem because I was setting HOMEBREW_CASK_OPTS=--caskroom=/opt/homebrew-cask/Caskroom. After removing it, brew cask works fine.

I second that @arakashic. I was having the same issue and following this thread.

Was using export HOMEBREW_CASK_OPTS="--appdir=$HOME/Applications --caskroom=$HOME/Caskroom".
Changing this to export HOMEBREW_CASK_OPTS="--appdir=$HOME/Applications",
I find brew cask now works.

AHA! @arakashic and @drjsanger's advice worked. I had:

export HOMEBREW_CASK_OPTS="--appdir=/Applications --caskroom=/opt/homebrew-cask/Caskroom"

...in my .bashrc. Changed that to:

export HOMEBREW_CASK_OPTS="--appdir=/Applications"

$ unset HOMEBREW_CASK_OPTS

$ source .bashrc

$ echo $HOMEBREW_CASK_OPTS
--appdir=/Applications

$ brew update
Updated 1 tap (homebrew/core).
==> Updated Formulae
asciidoctor               hfstospell                hopenpgp-tools            just                      scala

$ brew --version
Homebrew 1.5.11
Homebrew/homebrew-core (git revision d1e8c7; last commit 2018-03-20)

$ brew cask info google-chrome
google-chrome: 65.0.3325.162
https://www.google.com/chrome/
Not installed
From: https://github.com/caskroom/homebrew-cask/blob/master/Casks/google-chrome.rb
==> Name
Google Chrome
==> Artifacts
Google Chrome.app (App)

This is fixed in master by https://github.com/Homebrew/brew/pull/3950

You can run this to switch to master branch.

$ export HOMEBREW_DEVELOPER=1

$ brew update

Thanks everyone for helping out - I fixed this by removing the --caskroom flag and sourcing my .zshrc file.

Was this page helpful?
0 / 5 - 0 ratings