Why is it so hard to install old versions of homebrew-core packages? #155
-
Title. You can't EDIT: To anybody who has come to this page, use this script: https://github.com/orgs/Homebrew/discussions/155#discussioncomment-7711498 |
Beta Was this translation helpful? Give feedback.
Replies: 12 comments 60 replies
-
Because we don't support it and generally advise against it.
The point of |
Beta Was this translation helpful? Give feedback.
-
If anybody is Googling this after me, here is what I did (since this doesn't seem to be documented coherently anywhere):
[0] You probably want to do this, just to get [1] This creates a new Tap, which is a Git repo. Apparently homebrew also expects you to publish these taps so it automatically adds an upstream to 2022 UPDATE: Creating a GitHub repository now seems mandatory. It now asks for my GitHub login details. [2] The easiest way to find this is by going through the history page on GitHub: [3] This is not necessary since this formula has been extracted and will never get updated (unless you |
Beta Was this translation helpful? Give feedback.
-
I greatly empathize with the OP. The Homebrew team seems to have many justified reasons for removing this functionality (and rarely get the credit deserved for maintaining > 5,000 core formula as well as a robust automated build infrastructure), but there are also several controlled use-cases to either stick to an old |
Beta Was this translation helpful? Give feedback.
-
Primary reason I mostly use MacPort. If you can install a specific version once, you will be able to install it in the future. And if port do fail to install one things, 99% of the time it's your fault and you will be able to reproduce the problem. For maximum packages list, joke about beer, cool website and minimal dependencies download use Homebrew. |
Beta Was this translation helpful? Give feedback.
-
Python 3.9.8 has serious regression (Azure/azure-cli#20322, Azure/azure-cli#20269, https://bugs.python.org/issue45235), but there is no easy way to install Python 3.9.7 with brew. |
Beta Was this translation helpful? Give feedback.
-
For what it's worth, one of our users found another smart way to install old versions (Azure/azure-cli#20211 (comment)):
The removal of |
Beta Was this translation helpful? Give feedback.
-
Using extract for flutter just ends up in an error I have tried several versions. Crippling downloading older versions of anything has messed up my workflow so many times, especially with cryptocurrency projects that still (annoyingly) use openssl 1.0.1, I might just have to abandon brew completely sadly. I literally have been keeping VM's of older OS's with older versions of brew as a work around just to keep my work flow going. I mostly used brew to install prerequisites easily, I don't mind building from source, if building from source could be the default feature for really old stuff that would be nice. Could even have a big fat warning that legacy is not directly supported. Oddly some old formulas remain such as berkeley-db@4, wonder if that has to do with bitcoin... |
Beta Was this translation helpful? Give feedback.
-
Hi, I am using RMagick 4.2.2 gem in my project which uses ImageMagick 7.1.0. Now I have updated the ImageMagick to 7.1.1-11. Now I can't install the older version of ImageMagick using the brew commands. |
Beta Was this translation helpful? Give feedback.
-
EDIT: This approach does not always work, because some formulas are not updated by PR. However, I have made a generic script. See new answer: https://github.com/orgs/Homebrew/discussions/155#discussioncomment-7711498Original answer: After much pain, I think this is the only way to install old brew packages, as of November 2023. (The old Step 1:First, we need to find the pull request that created the version we want to use. Luckily, brew has a command called brew search --closed --pull-request FORMULA_NAME@FORMULA_VERSION For example, with brew search --closed --pull-request argocd@2.8.6
# ==> Closed pull requests
# argocd 2.8.6 (https://github.com/Homebrew/homebrew-core/pull/153078) Step 2:Now we need to get the raw GitHub URL for the Step 2a:Open the PR link from step 1, and scroll down until you find something that looks like this: Step 2b:Look for the file ending in Step 2c:Click on the "raw" button on the Step 3:Now that we have the URL we can download it and use # for example, this is the URL for version `2.8.6` of `argocd`
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/67082a334f219440f90dd221ad939d0ef6756409/Formula/a/argocd.rb
# remove any existing version
brew remove argocd
# install from the local formula
brew install ./argocd.rb
# pin the version to prevent `brew upgrade`
brew pin argocd |
Beta Was this translation helpful? Give feedback.
-
I have made a It works by:
UsageThe general usage is: brew-switch <formula> <version> For example, to install version brew-switch argocd 2.8.6 Install1. Dependencies# install github command line
brew install gh
# authenticate with your github account
gh auth login 2. Add
|
Beta Was this translation helpful? Give feedback.
-
Would a |
Beta Was this translation helpful? Give feedback.
-
Guys, they will never support the ability to at least get and compile older libs nor even list the required deps for said libs so one can compile them themselves. They strictly follow Apples EOL. I have slowly moved to https://www.pkgsrc.org so I can compile on my older machines as they archive their older releases without bashing you over the head to update. As much as a love homebrew, I am having to leave as it just breaks everything near an EOL. Just move on, there is no reason to even argue, they are not going to do anything about it. They won't even package up old versions for download, it's difficult to maintain something once your to deep in the rabbit hole. |
Beta Was this translation helpful? Give feedback.
I have made a
brew-switch
function that you can add to your~/.zshrc
that will download any version of any core formula.It works by:
Homebrew/homebrew-core
repo for the most recent one that contains the name of your formula and the requested version<formula>.rb
file from that commitbrew install ./<formula>.rb
to install the file locallybrew pin <formula>
to stopbrew upgrade
from messing with itUsage
The general usage is:
For example, to install version
2.8.6
of theargocd
formula:Install
1. Dependencies