Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Homebrew: How do you specify a version using brew cask?

Tags:

homebrew

How do I specify a version number when installing something with brew cask install?

like image 733
Jethro Avatar asked Oct 14 '19 09:10

Jethro


People also ask

How do I install a specific version of a package in brew?

If you can't use the web interface, you can clone the repo and do it locally: use git log master -- Formula/PACKAGENAME. rb to get the commit history, check out the correct commit, and then run brew install Formula/PACKAGENAME. rb to install it.

What is the difference between brew and cask?

brew cask is an extension to brew that allows management of graphical applications through the Cask project. Homebrew Cask extends Homebrew and brings its elegance, simplicity, and speed to OS X applications and large binaries alike. Cask deals with a mixture of software and licences.

What is cask option in brew?

brew cask is an extension to standard brew based software management, it's a type of formula that documents the process of installing a graphical application (and not entirely coincidentally closed-source software).


1 Answers

Sometimes the Jethro instruction won't work, because we will get an error like: Invalid usage: Non-checksummed download of <FORMULA_NAME> formula file from an arbitrary URL is unsupported.

I found an workaround:

  1. Go to the Homebrew Cask search page: https://formulae.brew.sh/cask/
  2. Type and find the application you are looking for
  3. Click Cask code link
  4. On Github click History button
  5. Find the version you need by reading the commit messages and view the raw file. Confirm the version variable (normally on line 2) is the version you need.
  6. Click on the name of the commit, then three dots and select View file
  7. Right-click Raw button and Save Link As... to download the file locally
  8. When downloaded, go to download directory cd Downloads/
  9. Finally run brew install --cask <FORMULA_NAME>.rb
  10. Voilà 😄

If you need some visual assistance check the screenshots here.

like image 84
Bartosz Petryński Avatar answered Oct 13 '22 18:10

Bartosz Petryński