[Solution] Error: brew cask is no longer a brew command


% brew cask install docker

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


Reason for the error:

The syntax brew cask <command> has been deprecated since Homebrew 2.6.0 and disabled since 2.7.0. This has been replace by in favor of brew <command> --cask

Read more: https://github.com/Homebrew/discussions/discussions/340#discussioncomment-232364



Solution:

brew <command> --cask



Example:
% brew install docker --cask
Running `brew update --auto-update`...
Brew cask command example

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org



















Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap