315

I am following an online resource for installing two Mac utilities

http://www.economyofeffort.com/2014/08/11/beyond-ctrl-remap-make-that-caps-lock-key-useful/

Here is the pertinent section:

Install both Karabiner and Seil. (Here again, if you use Homebrew Cask, you can do this with

$ brew cask install karabiner and

$ brew cask install seil

But the cask option is not recognized?

06:51:35/shared $brew cask install seil
Error: Unknown command: cask

Then, just for laughs I tried the command without the cask:

06:55:01/shared $brew install seil
Error: No available formula for seil
Searching formulae...
Searching taps...
Caskroom/cask/seil

It is not clear what the last line of output even means: nothing seems to have happened on the system.

I am on Yosemite.

Community
  • 1
  • 1
WestCoastProjects
  • 58,982
  • 91
  • 316
  • 560

19 Answers19

1296

As of 2021, the answer to this question for me was that instead of

brew cask install myprogram

I should run:

brew install --cask myprogram
Jeremy John
  • 13,686
  • 2
  • 16
  • 16
  • 24
    I was trying to use it but I think you don't need to pass cask anymore. I just hit: `brew install spotify` It worked for me. – Ederson Badeca Feb 08 '21 at 17:26
  • Found link in homebrew's Github discussion with explanation of behavior change: https://github.com/Homebrew/discussions/discussions/340#discussioncomment-232364 – CrashNeb Feb 19 '21 at 18:44
  • 1
    "All brew cask commands have been deprecated in favour of brew commands (with --cask) when necessary" read on https://brew.sh/2020/12/01/homebrew-2.6.0/ – Daniel Delgado Feb 25 '21 at 21:03
  • cask was warned that would be obsolete and removed in future brew versions, and should be replaced by `--cask` – Kohls Apr 18 '21 at 18:10
  • 3
    nice ```brew install --cask font-fira-code``` – Stephen Ó Connor Sep 29 '21 at 10:24
  • worked like charm :D – Karan Oct 24 '21 at 13:35
  • @Ederson-Badeca I still needed cask to install docker for desktop. ```brew install --cask docker``` – mpowrie Dec 13 '21 at 00:25
  • `brew install cask your-package` worked for me instead – Valiant Dec 23 '21 at 08:23
  • Unless there are conflicting cask and formulae names (check handbrake as an example using brew search handbrake) then the standard format of brew install nameOfYourProgram should work. Alternatively, you should be using the --cask flag according to brew install -h which reports '--cask' and not 'cask'. – Nick the Community Scientist Jan 19 '22 at 14:13
54

As of 2021 use this command instead:

brew install --cask your-package
jeffbyrnes
  • 2,182
  • 2
  • 22
  • 33
Sahana M
  • 621
  • 4
  • 3
30

UPD: since the command brew install caskroom/cask/brew-cask gives you the following error Error: caskroom/cask was moved. Tap homebrew/cask instead. please run brew install homebrew/cask

To use brew cask you should have it installed, this is a extension of brew, is not native.

To install it you need to run brew install caskroom/cask/brew-cask from your command line

Homebrew Cask Github

Ben
  • 20,737
  • 12
  • 71
  • 115
portella
  • 833
  • 6
  • 14
  • 6
    `caskroom/cask` was moved, i need to use `homebrew/cask` instead. `brew install caskroom/cask/brew-cask Error: caskroom/cask was moved. Tap homebrew/cask instead.` – Rollsbean Feb 09 '21 at 03:14
  • 5
    I had the same issue @KDFinal I finally got it to work by changing the way I reference the file I was wanting to install to: "brew install --cask homebrew/cask-versions/adoptopenjdk8" – cheesydoritosandkale Feb 10 '21 at 16:26
  • the homebrew/cask is worked on me, but it still get error after I ran cask – Berlian May 11 '21 at 05:08
23

I had the same issue. Now you should use:

brew install --cask <package>

instead of:

brew cask install <package>
Roland
  • 758
  • 1
  • 7
  • 13
9

You can also just brew install Caskroom/cask/seil. It will automatically tap the correct cask for you :)

Steve Tauber
  • 9,551
  • 5
  • 42
  • 46
  • `No available formula or cask with the name "caskroom/cask/seil". ==> Searching for similarly named formulae... Error: No similarly named formulae found.` – Dr.jacky Dec 17 '21 at 16:09
  • This particular package has been obsoleted https://github.com/tekezo/Seil – Steve Tauber Dec 18 '21 at 22:24
8

Use brew install --cask <package_name>

It worked for me after trying multiple permutations and combinations.

Sourabh Bhavsar
  • 301
  • 3
  • 3
7

None of these answers—despite some of them being correct at the moment—are showing their work and so may become no longer correct if this changes again.

I ran into this issue, stumbled on this page, and it was enough to get me curious about the change in command line and where that might be documented. Turns out you can go right here:

https://formulae.brew.sh/cask/

and any of those you click on will show you the current command to use. So, for instance, the iterm2 page:

https://formulae.brew.sh/cask/iterm2

right at the top it's got the correct command to use so if they ever change it, you'll see what the new syntax is.

  • Thanks for this answer. You are right with your examples. Also, if you go to brew.sh, in the cask section, it lists the "new" command `$ brew install --cask firefox`, while earlier, the format of the command was e.g. `brew cask install skype`. Apparently this was changed in 2.6.0. The blog/release notes https://brew.sh/2020/12/01/homebrew-2.6.0 mention: "All brew cask commands have been deprecated in favour of brew commands (with --cask) when necessary", I did not find further details why they made this change though. – Sacha Guyer Apr 14 '21 at 12:58
6

brew tap caskroom/cask

brew install brew-cask

Now, you are ready to brew cask.

Xinyu
  • 87
  • 1
  • 5
  • 4
    `brew` didn't find the brew-cask formula, but did find `brew install homebrew/completions/brew-cask-completion` instead. That enabled `brew cask` for me. – qix Aug 31 '16 at 07:15
  • **Error: caskroom/cask was moved. Tap homebrew/cask instead.** – IgorGanapolsky Mar 29 '21 at 17:59
6

@JeremyJohn answer is out to date, for installing Android sdk you should use this command:

brew install --cask android-sdk
DolDurma
  • 15,753
  • 51
  • 198
  • 377
5

With macOS Big Sur , running brew install ... will works

4

Install it with this command:

brew install brew-cask-completion
RNK
  • 5,582
  • 11
  • 65
  • 133
4

I don't why the highest voted answer doesn't work for me. But you can do something like brew install homebrew/cask/appName

Qiyu Zhang
  • 175
  • 1
  • 7
4

Since Homebrew 2.6.0 released in 2020.12.01, brew cask has been deprecated and later dropped.

Homebrew not only manages TUI packages (formulae from the homebrew-core repo), it's also capable of managing GUI packages (casks from homebrew-cask repo). In the old days, brew commands like brew list, brew outdated take effect only on formula. Cask operations are separated into brew cask.

Homebrew has prioritized support for casks since 2.6.0. All the brew commands take effect on both formulae and casks. You must specify --formula or --cask explicitly to indicate them separately.

# Some examples
brew list # both formula and cask
brew list --formula
brew list --cask

brew outdated # both formula and cask
brew outdated --formula
brew outdated --cask
Simba
  • 23,537
  • 7
  • 64
  • 76
2

For me,

brew install <program_name> has worked fine till now.

For example, I was trying to install Oracle Virtual Box and the formula for it was listed as

$ brew cask install virtualbox.

But, $ brew install virtualbox worked just fine. I found that it was installing the application as cask as shown in the screenshot.enter image description here

I think homebrew automatically takes care of the cask dependency.

hermit
  • 1,048
  • 1
  • 6
  • 16
  • Why do I get this error: `fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.` – IgorGanapolsky Mar 29 '21 at 18:01
1

I would recommend following the below steps.

Step 1: Run brew install --help

Might show something like this.

Usage: brew install [options] formula|cask [...]

Install a formula or cask. Additional options specific to a formula may be
appended to the command.

Step 2: follow the hint ot help create the command and execute.

brew install cask chromedriver
Gupta
  • 8,882
  • 4
  • 49
  • 59
1

Instead of this

brew cask install yourprogram

I have run:

brew install --cask yourprogram
Jasmin Sojitra
  • 1,090
  • 10
  • 24
0

One other thing to check is that it may be installed but not linked:

$ brew install caskroom/cask/brew-cask
Warning: caskroom/cask/brew-cask-0.59.0 already installed, it's just not linked

This is easily fixed by running:

$ brew link brew-cask
drewish
  • 9,042
  • 9
  • 38
  • 51
0

I had the same issue before. Had my head scratching and finally figured out and use the commands like:

brew commands --cask

This worked for me.

Shankhar
  • 1
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 11 '22 at 16:23
0

!!!!

brew cask is no longer a brew command. Use brew <command> --cask instead.

Example Syntax:-

Use:

brew install --cask <package_name>

Instead of:

brew cask install <package_name>
Shehan Jayalath
  • 447
  • 3
  • 13