3

I want to install a particular version of VirtualBox, namely 5.2.22, on my MacBook Pro via brew

This is the error message i got from

$ brew install [email protected]
Updating Homebrew...
Error: No available formula with the name "[email protected]"
Found a cask named "[email protected]" instead.

So how can I install this version in this case?

3 Answers 3

2

Casks are installed via brew cask install so:

brew cask install [email protected]
1
  • 3
    Now it fails with: Error: Cask '[email protected]' is unavailable: No Cask with this name exists.
    – Ivan
    Dec 12, 2019 at 23:24
3

You can do this:

cd "$(brew --repo homebrew/cask)"

brew log Casks/virtualbox.rb

That will give a list of commits and you can find which one you need. Once you find the commit you need, copy it and do

git checkout wanted_commit

For the brew install, do

HOMEBREW_NO_AUTO_UPDATE=1 brew cask install virtualbox

This will get the version from the commit you checked out.

Other option is once you get the commit, you can

brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask/wanted_commit/Casks/virtualbox.rb

0

Use this instruction how to set a particular version of a cask package https://zeckli.github.io/en/2016/11/05/use-homebrew-cask-to-downgrad-or-install-en.html

E.g. for setting a virtual box package, I've used the next data:

  • version '5.2.22,126460'
  • sha256 'b54c43476ec7b95998cd45a257e3fc9838121db57f742f921fec7e895dbd8472'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .