できない.dev

Homebrew「No available formula with the name」の原因と直し方

No available formula with the name は、brew search で正しい名前を探せば直る。
homebrew/core に無い formula は、hashicorp/tap/terraform のように tap を含めた名前で入れる。

公開: 更新:

症状できない · exit 1
brew install pyhton
…
Warning: No available formula with the name "pyhton". Did you mean phoon?
==> Searching for similarly named formulae and casks...
==> Formulae
phoon
解決後できた · exit 0
brew install hashicorp/tap/terraform
…
==> Running `brew cleanup terraform`...
==> Caveats
Bash completion has been installed to:
  /home/linuxbrew/.linuxbrew/etc/bash_completion.d

2026-11-08 に homebrew/brew(Homebrew 4.6.20) で実際に打って取った出力。検証環境の詳細

要約

brew install に渡した名前の formula が、手元で使える tap のどこにも無いと出る。
Homebrew 4.6.20(公式の homebrew/brew イメージ)で brew install pyhton と打つと、次の警告に続けて似た名前の候補を挙げ、終了コード 1 で終わった。

Warning: No available formula with the name "pyhton". Did you mean phoon?

似た名前も無いときは、Error: No formulae or casks found for の行が続く。
名前の綴りか、formula の置き場所(tap)のどちらかが違っている。

実行例

homebrew/brew のコンテナ(Homebrew 4.6.20)で brew install pyhton と brew install vault を打つと、どちらも No available formula の警告を出して終了コード 1 になった。
brew install hashicorp/tap/terraform に変えると終了コード 0 で入り、terraform version は v1.17.1 を返した。

$ brew --version
Homebrew 4.6.20
Homebrew/homebrew-core (git revision ca889ec7d9f; last commit 2025-11-03)
$ brew install pyhton
Warning: No available formula with the name "pyhton". Did you mean phoon?
==> Searching for similarly named formulae and casks...
==> Formulae
phoon
 
To install phoon, run:
  brew install phoon
$ echo $?
1
$ brew info terraform
Error: No available formula with the name "terraform". Did you mean terraformer or terraform-ls?
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
$ echo $?
1
$ brew install vault
Warning: No available formula with the name "vault". Did you mean vaulted?
==> Searching for similarly named formulae and casks...
==> Formulae
argocd-vault-plugin
aws-vault
msgvault
ssh-vault
vault-cli
vaulted
 
To install argocd-vault-plugin, run:
  brew install argocd-vault-plugin
$ echo $?
1
$ brew search terraform
cf-terraforming
iam-policy-json-to-terraform
terraform-cleaner
terraform-docs
terraform-graph-beautifier
terraform-iam-policy-validator
terraform-inventory
terraform-local
terraform-ls
terraform-lsp
terraform-mcp-server
terraform-module-versions
terraform-provider-libvirt
terraform_landscape
terraformer
$ brew search "/^hell/"
hello
hellwal
$ brew install hashicorp/tap/terraform
==> Tapping hashicorp/tap
Cloning into '/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/hashicorp/homebrew-tap'...
Tapped 2 casks and 34 formulae (102 files, 1.9MB).
==> Fetching downloads for: terraform
==> Fetching hashicorp/tap/terraform
==> Downloading https://releases.hashicorp.com/terraform/1.17.1/terraform_1.17.1_linux_amd64.zip
==> Installing terraform from hashicorp/tap
🍺  /home/linuxbrew/.linuxbrew/Cellar/terraform/1.17.1: 8 files, 123.3MB, built in 2 seconds
==> Running `brew cleanup terraform`...
==> Caveats
Bash completion has been installed to:
  /home/linuxbrew/.linuxbrew/etc/bash_completion.d
$ echo $?
0
$ terraform version
Terraform v1.17.1
on linux_amd64
$ echo $?
0

— 2026-11-08 時点の出力

検証環境Git 2.51.2 / Homebrew 4.6.20 / 2026-11-08 検証
検証日
実行環境
homebrew/brew Ubuntu 22.04.5 LTS
バージョン
  • Git 2.51.2
  • Homebrew 4.6.20

この記事の「実行例」は、上記の環境で実際にコマンドを実行して得られた出力をそのまま掲載しています。 再現手順はリポジトリの検証スクリプトとして管理し、定期的に再実行して出力を更新しています。

解決策

1. brew search で正しい名前を探す

brew search terraform
brew search /^hell/

brew search は名前の一部で formula を探し、スラッシュで囲んだ語は正規表現として扱う(brew のマニュアル(新しいタブで開く))。
/^hell/ では hello と hellwal が返った。
brew search terraform の結果には terraform-ls などが並ぶが、terraform 自体は出てこない。
結果に目的の名前が無ければ、homebrew/core には無いと判断できる。

2. tap を含めた完全な名前で入れる

homebrew/core に無い formula は、ユーザー/リポジトリ/formula の形で指定する(Taps の説明(新しいタブで開く))。

brew install hashicorp/tap/terraform

Homebrew 4.6.20 では、この 1 行で hashicorp/tap の追加から Terraform のインストールまで進み、terraform version が版を返した。
先に brew tap hashicorp/tap を実行しておけば、短い brew install terraform も通った。

新しい Homebrew で短い名前が通らないとき

Taps の説明では、tap を追加しただけではそのリポジトリ全体を信頼したことにならない。
短い名前で入れる前に brew trust --formula hashicorp/tap/terraform で信頼する手順が書かれているので、迷ったら完全な名前で入れる。

よくある原因

  1. 名前を打ち間違えている。
    Did you mean は綴りが近い名前を挙げるだけなので、pyhton には python ではなく phoon が出た。
  2. その formula が homebrew/core に無く、別の tap にある。
    brew info terraform は No available formula with the name "terraform" で止まり、brew install vault も同じ警告になった。
    どちらも HashiCorp の hashicorp/tap で配られている。