What is the syntax for brew link
@-versioned formulae?
#339
Replies: 11 comments 36 replies
-
The linking of arbitrary versions of the same formula died along with |
Beta Was this translation helpful? Give feedback.
-
What was the motivation to disable the |
Beta Was this translation helpful? Give feedback.
-
example of an issue caused by this today for me: Today I upgraded a package, which apparently pulled in now everything related to ruby is broken on my system, which I eventually figured out was from that upgrade this morning, and I had to find this thread to figure out why I tried deleting 3.0.0_1 from /usr/local/Cellar/ruby/, so I could
how can I recover from this situation, other than manually fixing every mention of is it no longer possible to ever go back to an older version after an upgrade with homebrew? is this a separate bug that I should report, or is the intended behaviour? |
Beta Was this translation helpful? Give feedback.
-
I use Homebrew on 3 Linux systems and my MacBook and these are a few more suggestions I can make to help avoid some of these issues in the future:
And to reiterate what has already been said here already, the goal of Homebrew is to provide you with the latest software, not to maintain strictly versioned environments. Many other tools exist to allow you to install versioned software - containers, Anaconda, Spack, python virtualenvs, rbenv, etc. All of these can be used side-by-side with Homebrew (in some cases it takes a bit of work to make them get along). I have personally found that software or configuration setups which have difficulty keeping up with dependency changes to be brittle and often not designed with the future in mind. My philosophy on this is best summarized by a funny quote from the former sysadmin of one of the clusters I use:
|
Beta Was this translation helpful? Give feedback.
-
Well, as the thing called 'reality' always happens I need to downgrade some versions. As far as I understand if there is only one formulae for software, I can't install any other one? Can I then downgrade homebrew to the version that allows brew switch? Which version would it be then? |
Beta Was this translation helpful? Give feedback.
-
I will also contest the removal of |
Beta Was this translation helpful? Give feedback.
-
This change forces me to use homebrew 2.6.2 (with switch command available) as long as a new package manager arrives. Creating a new formula for every old version which does not exist but is needed for compiling is just insane. |
Beta Was this translation helpful? Give feedback.
-
this is causing my team some grief in my development cycle as we use Using the it's looking like we're going to have to build our own |
Beta Was this translation helpful? Give feedback.
-
The folks at Cloud Foundry have https://github.com/cloudfoundry/cli/wiki/Version-Switching-Guide which includes this guide for Switching CLI versions Using Brew Assuming you've installed both the v6 and v7 CLIs as follows:
Switch from v6 to v7:
Switch from v7 to v6:
Does that help? |
Beta Was this translation helpful? Give feedback.
-
I figured out how to re-implement the old #! /usr/bin/env bash
set -euo pipefail
pkg=$1
version=$2
brew unlink "$pkg"
(
pushd "$(brew --prefix)/opt"
rm -f "$pkg"
ln -s "../Cellar/$pkg/$version" "$pkg"
)
brew link "$pkg" I hope this helps someone who is affected by this change. EDIT: put this script in your PATH and name it |
Beta Was this translation helpful? Give feedback.
-
All changes of
Get the source of Then create a custom tap and put the file as I don't recommend you use my custom tap directly. |
Beta Was this translation helpful? Give feedback.
-
I can't find this anywhere. Basically I was doing
brew switch
and after a homebrew update it says"Error: Calling
brew switch
is disabled! Usebrew link
@-versioned formulae instead."I tried
brew link [email protected]
and lots of other variations, but nothing works."Error: No such keg: /usr/local/Cellar/[email protected]"
How should this work? Everything in my environment is fine, there shouldn't be any issues related to that.
Beta Was this translation helpful? Give feedback.
All reactions