brew install doesn't work for custom tap

Created on 10 Jun 2020  Â·  13Comments  Â·  Source: Homebrew/brew

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • [x] ran brew update and can still reproduce the problem?
  • [x] ran brew doctor, fixed all issues and can still reproduce the problem?
  • [x] ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
  • [x] if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?
ECS-3f5e6d66:~ administrator$ brew config
HOMEBREW_VERSION: 2.3.0-71-g3a7213c
ORIGIN: https://github.com/Homebrew/brew
HEAD: 3a7213c2553da5a9022f82a746214ea255202ed0
Last commit: 11 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 9c7fa7618a5b5a260beeb5a578e01ff24bb59922
Core tap last commit: 48 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_MAKE_JOBS: 2
CPU: dual-core 64-bit sandybridge
Homebrew Ruby: 2.6.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/bin/ruby
Clang: 10.0 build 1001
Git: 2.27.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 1.8.0_252
macOS: 10.14.6-x86_64
CLT: 10.3.0.0.1.1562985497
Xcode: N/A
You have new mail in /var/mail/administrator

ECS-3f5e6d66:~ administrator$ brew doctor
Your system is ready to brew.

What you were trying to do (and why)

Trying to use custom tap to install specific version of a formula

What happened (include command output)

brew install didn't work, even though the suggested install command is same as the one tried in console.

What you expected to happen

brew install should work

==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
This similarly named formula was found:
administrator/git2.26.0/[email protected]
To install it, run:
  brew install administrator/git2.26.0/[email protected]

Step-by-step reproduction instructions (by running brew install commands)

ECS-3f5e6d66:~ administrator$ brew tap-new administrator/git2.26.0
==> Created administrator/git2.26.0
/usr/local/Homebrew/Library/Taps/administrator/homebrew-git2.26.0
You have new mail in /var/mail/administrator

ECS-3f5e6d66:~ administrator$ brew extract git administrator/git2.26.0 --version='2.26.0' --force
==> Searching repository history
==> Writing formula for git from revision a847772 to /usr/local/Homebrew/Library/Taps/administrator/homebrew-git2.26.0/Formula/[email protected]

ECS-3f5e6d66:~ administrator$ brew install administrator/git2.26.0/[email protected]
Error: No available formula with the name "administrator/git2.26.0/[email protected]" 
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
This similarly named formula was found:
administrator/git2.26.0/[email protected]
To install it, run:
  brew install administrator/git2.26.0/[email protected]

Most helpful comment

@Corey600 @freewil This will be fixed when https://github.com/Homebrew/brew/pull/7879 is merged.

All 13 comments

if I change the folder structure to administrator/git. I get below error

ECS-3f5e6d66:~ administrator$ brew install administrator/git/[email protected]
==> Installing [email protected] from administrator/git
==> Downloading https://homebrew.bintray.com/bottles-git/git%402.26.0-2.26.0.mojave.bottle.tar.gz

curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "[email protected]"
Download failed: https://homebrew.bintray.com/bottles-git/git%402.26.0-2.26.0.mojave.bottle.tar.gz
You have new mail in /var/mail/administrator

@Homebrew/brew I think this is more up your alley.

Sorry, you'll need to figure this out yourself, I don't see evidence for a Homebrew bug here. For that we'd need step-by-step reproduction instructions (with as minimal input data as possible).

I can reproduce this bug. It looks legit to me.

$ brew tap-new administrator/git2.26.0
$ brew extract git administrator/git2.26.0 --version='2.26.0'
$ brew install administrator/git2.26.0/[email protected]
Error: No available formula with the name "administrator/git2.26.0/[email protected]" 
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
This similarly named formula was found:
administrator/git2.26.0/[email protected]
To install it, run:
  brew install administrator/git2.26.0/[email protected]

Thanks @sjackman I've seen this with those reproduction instructions. I've submitted a PR to fix this but the tap name is invalid (we don't allow numbers in the repository name).

@MikeMcQuaid Thanks for fixing the issue. Also I need some info on your comment regarding the the tap name is invalid (we don't allow numbers in the repository name)

May I know how can I install the older version then (after extracting it)?. From the home-brew extract docs I just found the below instruction and obviously it fails as you have mentioned.

brew tap-new administrator/git
brew extract git administrator/git --version='2.26.0'

brew install administrator/git/[email protected]
==> Installing [email protected] from administrator/git
==> Downloading https://homebrew.bintray.com/bottles-git/git%402.26.0-2.26.0.mojave.bottle.tar.gz

curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "[email protected]"
Download failed: https://homebrew.bintray.com/bottles-git/git%402.26.0-2.26.0.mojave.bottle.tar.gz

Also I need some info on your comment regarding the the tap name is invalid (we don't allow numbers in the repository name)

I'm not sure what else there is to say here: we don't support GitHub repository names with numbers for taps.

curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "[email protected]"
Download failed: https://homebrew.bintray.com/bottles-git/git%402.26.0-2.26.0.mojave.bottle.tar.gz

You need to remove the bottle do block from the formula.

brew install administrator/git/[email protected]

we don't support GitHub repository names with numbers for taps.

To clarify, the repository name does not have numbers in it, the formula filename/name does, which is to be expected unless you go out of your way to rename it when extracting the version into a custom tap. The github username here is administrator, repository name is git and formula name/filename is [email protected].

I was able to reproduce this same issue with another repo that was working until a recent homebrew update:

brew tap hellodigit/ios-build
brew install hellodigit/ios-build/[email protected]

I was able to narrow down the issue to homebrew starting with v2.2.17. You can see below with v2.2.16, the bottle is not found and it installs from source. With v2.2.17, it does not attempt to install from source.

Homebrew v2.2.16

==> veertu-anka: Note: checking out '2.2.16'.
==> veertu-anka:
==> veertu-anka: You are in 'detached HEAD' state. You can look around, make experimental
==> veertu-anka: changes and commit them, and you can discard any commits you make in this
==> veertu-anka: state without impacting any branches by performing another checkout.
==> veertu-anka:
==> veertu-anka: If you want to create a new branch to retain commits you create, you may
==> veertu-anka: do so (now or later) by using -b with the checkout command again. Example:
==> veertu-anka:
==> veertu-anka:   git checkout -b <new-branch-name>
==> veertu-anka:
==> veertu-anka: HEAD is now at c0f5a52d8 Merge pull request #7532 from Bo98/bintray-url-encode
    veertu-anka: Homebrew 2.2.16
    veertu-anka: Homebrew/homebrew-core (git revision d89ca2; last commit 2020-06-16)
    veertu-anka: ==> Tapping hellodigit/ios-build
==> veertu-anka: Cloning into '/usr/local/Homebrew/Library/Taps/hellodigit/homebrew-ios-build'...
    veertu-anka: Tapped 4 formulae (42 files, 37.3KB).
    veertu-anka: ==> Installing [email protected] from hellodigit/ios-build
    veertu-anka: ==> Downloading https://homebrew.bintray.com/bottles-ios-build/shellcheck%400.7.0-0.7.0.mojave.bottle.tar.gz
==> veertu-anka: curl: (22) The requested URL returned error: 404 Not Found
==> veertu-anka: Error: Failed to download resource "[email protected]"
==> veertu-anka: Download failed: https://homebrew.bintray.com/bottles-ios-build/shellcheck%400.7.0-0.7.0.mojave.bottle.tar.gz
==> veertu-anka: Warning: Bottle installation failed: building from source.
    veertu-anka: ==> Installing dependencies for hellodigit/ios-build/[email protected]: ghc, cabal-install and pandoc
    veertu-anka: ==> Installing hellodigit/ios-build/[email protected] dependency: ghc

Homebrew v2.2.17

==> veertu-anka: Note: checking out '2.2.17'.
==> veertu-anka:
==> veertu-anka: You are in 'detached HEAD' state. You can look around, make experimental
==> veertu-anka: changes and commit them, and you can discard any commits you make in this
==> veertu-anka: state without impacting any branches by performing another checkout.
==> veertu-anka:
==> veertu-anka: If you want to create a new branch to retain commits you create, you may
==> veertu-anka: do so (now or later) by using -b with the checkout command again. Example:
==> veertu-anka:
==> veertu-anka:   git checkout -b <new-branch-name>
==> veertu-anka:
==> veertu-anka: HEAD is now at ca5eac845 Merge pull request #7592 from MikeMcQuaid/display_options_builderror
    veertu-anka: Homebrew 2.2.17
    veertu-anka: Homebrew/homebrew-core (git revision d89ca2; last commit 2020-06-16)
    veertu-anka: ==> Tapping hellodigit/ios-build
==> veertu-anka: Cloning into '/usr/local/Homebrew/Library/Taps/hellodigit/homebrew-ios-build'...
    veertu-anka: Tapped 4 formulae (42 files, 37.3KB).
    veertu-anka: ==> Installing [email protected] from hellodigit/ios-build
    veertu-anka: ==> Downloading https://homebrew.bintray.com/bottles-ios-build/shellcheck%400.7.0-0.7.0.mojave.bottle.tar.gz
==> veertu-anka: curl: (22) The requested URL returned error: 404 Not Found
==> veertu-anka: Error: Failed to download resource "[email protected]"
==> veertu-anka: Download failed: https://homebrew.bintray.com/bottles-ios-build/shellcheck%400.7.0-0.7.0.mojave.bottle.tar.gz

brew install administrator/git2.26.0

This had numbers in it.

I was able to narrow down the issue to homebrew starting with v2.2.17. You can see below with v2.2.16, the bottle is not found and it installs from source. With v2.2.17, it does not attempt to install from source.

Thanks, that's helpful. I'll take a look.

@freewil Thanks for pointing out the exact issue, yes the number is from the formula.
@MikeMcQuaid As this issue is closed will the brew extract older version issue will are tracked in different issue?.
For now we are using the raw url to download the older versions. However if the extract formula is fixed, it will be really helpful. thanks

I was able to narrow down the issue to homebrew starting with v2.2.17. You can see below with v2.2.16, the bottle is not found and it installs from source. With v2.2.17, it does not attempt to install from source.

@MikeMcQuaid Has the problem been solved ?When will it be released ?

@Corey600 Not solved.

@Corey600 @freewil This will be fixed when https://github.com/Homebrew/brew/pull/7879 is merged.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jokeyrhyme picture jokeyrhyme  Â·  3Comments

JaKXz picture JaKXz  Â·  3Comments

fxcoudert picture fxcoudert  Â·  3Comments

hktalent picture hktalent  Â·  4Comments

kirk86 picture kirk86  Â·  3Comments