Can you install disabled Homebrew packages?
Asked Answered
I

4

22
> brew install [email protected]
Error: [email protected] has been disabled because it is not maintained upstream!

I don't want to have to install Maven 3.5, but I need to install Maven 3.5. Can I force Homebrew to install this package it clearly knows about?

Iconoclast answered 2/9, 2022 at 17:36 Comment(2)
You can add Maven Wrapper to your project, and specify the Maven version used by Maven Wrapper.Transpicuous
Why do you need such an old version of Maven.. use most recent one... Or if you need to stuck download it manually dlcdn.apache.org/maven/maven-3Grandstand
A
43

You can edit the formula with:

brew edit [email protected]

Remove the line:

disable! date: "2022-07-31", because: :unmaintained

And install it with:

HOMEBREW_NO_INSTALL_FROM_API=1 brew install [email protected]
Alexei answered 3/9, 2022 at 21:34 Comment(2)
this wont work unless you set environment variable HOMEBREW_NO_INSTALL_FROM_API=1 before invoking brew installDahlia
@Dahlia You are right. I've updated my answer.Alexei
R
6

After using brew edit [formula] to remove the disable line, you can install the formula with

HOMEBREW_NO_INSTALL_FROM_API=1 brew install [formula]

This is mentioned in https://docs.brew.sh/FAQ#can-i-edit-formulae-myself. Homebrew 4.0.17-67-gfff93a8 here.

Rudiger answered 12/5, 2023 at 12:22 Comment(1)
Wonderful, the answer above didn't work without this flag (Apple M1)Okajima
E
2

Slight tweak on the other answer to include HOMEBREW_NO_INSTALL_FROM_API=1, without this brew will use the API formula file (not your edited one)

Edit the formula with:

brew edit [email protected]

Remove the line:

disable! date: "2022-07-31", because: :unmaintained

And install it with:

HOMEBREW_NO_INSTALL_FROM_API=1 brew install [email protected]
Essary answered 6/6, 2023 at 16:38 Comment(0)
P
1

By default homebrew-core is not tapped anymore. This is needed for brew edit to work though. Thus this small addition to the other answers.

Tap homebrew-core:

brew tap homebrew/core --force

Edit the formula with:

brew edit [email protected]

Remove the line:

disable! date: "2022-07-31", because: :unmaintained

And install it with:

HOMEBREW_NO_INSTALL_FROM_API=1 brew install [email protected]
Pond answered 17/6 at 9:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.