5
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Homebrew で Error: Cask XXXXXX exists in multiple taps と言われたら

Posted at

現象

AdoptOpenJDK をインストールしようとした時のこと。

「Error: Cask adoptopenjdk8 exists in multiple taps」というエラーが表示された。

$ brew cask install adoptopenjdk8
Error: Cask adoptopenjdk8 exists in multiple taps:
  homebrew/cask-versions/adoptopenjdk8
  adoptopenjdk/openjdk/adoptopenjdk8

これは homebrew/cask-versions と adoptopenjdk/openjdk の両方の tap に adoptopenjdk8 が存在するということを示している。

調べてみると、確かに以下の2箇所に adoptopenjdk8 が定義されている。

対応方法

不要な tap を削除するか、または tap を指定してインストールする。

brew untap で不要な tap を削除してからインストールする例

$ brew untap adoptopenjdk/openjdk

$ brew cask install adoptopenjdk8

brew cask install で tap を指定してインストールする例

$ brew cask install homebrew/cask-versions/adoptopenjdk8

そもそも tap とは何なのか

tap はサードパーティのリポジトリ。

brew tapとは - Qiita

brew tapとは公式以外のリポジトリをフォーミュラとしてHomebrewに追加するもので、brewのもとでinstall,uninstall,updateなどが行えます。もちろん自分が公開しているものも簡単に追加できます。

brew/Taps.md at master · Homebrew/brew

Taps (third-party repositories)

brew tap コマンドでは追加したい GitHub リポジトリのパスを指定する。例えば https://github.com/foo-user/bar-repository の場合は以下のように指定する。

$ brew tap foo-user/bar-repository

追加済みの tap は brew tap コマンドで確認することができる。

$ brew tap
adoptopenjdk/openjdk
heroku/brew
homebrew/cask
homebrew/cask-versions
homebrew/core
homebrew/services
5
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?