Marchan4
@Marchan4 (Marchan4)

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

HomebrewをインストールしたのにMySQLをインストールできません。

Atomというテキストエディタのターミナルに

$brew -v
というコマンドを実行させて頂いて、

Homebrew 3.0.4
Homebrew/homebrew-core (git revision e0ee1; last commit 2021-03-04)
Homebrew/homebrew-cask (git revision 9cf84; last commit 2021-03-04)

が表示されて、Homebrewはインストールされておるはずなのに、

MySQLのバージョン5.7をインストールさせて頂くために
$ brew install mysql@5.7
というコマンドをAtomというテキストエディタのターミナルで実行させて頂いたら

Updating Homebrew...
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
kotlin-language-server

Warning: You are using macOS 10.13.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
old version.

Error: mysql@5.7: no bottle available!
You can try to install from source with:
  brew install --build-from-source mysql@5.7
Please note building from source is unsupported. You will encounter build
failures with some formulae. If you experience any issues please create pull
requests instead of asking for help on Homebrew's GitHub, Twitter or any other
official channels.

というエラーが出ました。

MySQLのバージョン5.7がインストールされているかどうかの確認のためにAtomというテキストエディタのターミナルで

mysql --version
というコマンドを実行させて頂いたら

bash: mysql: command not found

というメッセージが表示されました。

また最新版(2021/01/20リリース)のMySQL 5.6.51をインストールさせて頂くために、
(参照URL:https://openstandia.jp/oss_info/mysql/version/)

$ brew install mysql@5.6.51
というコマンドをAtomというテキストエディタのターミナルで実行させて頂きましたが、

==> Tapping homebrew/cask
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask'...
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 552479 (delta 4), reused 2 (delta 2), pack-reused 552469
Receiving objects: 100% (552479/552479), 243.64 MiB | 5.64 MiB/s, done.
Resolving deltas: 100% (390131/390131), done.
Checking out files: 100% (3933/3933), done.
Tapped 3842 casks (3,957 files, 261.4MB).
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "mysql@5.6.51".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.

というエラーが出てしまいました。

最新版(2021/01/20リリース)のMySQL 5.6.51がインストールされておるかを確認させて頂くために、

$ mysql --version
というコマンドをAtomというテキストエディタのターミナルで実行させて頂きましたが、

bash: mysql: command not found

というメッセージが出ました。

HomebrewがインストールされてるのにMySQLをインストールできない理由は何なのでしょうか。

0

1Answer

Warning: You are using macOS 10.13.

質問者さんはmacOS 10.13(High Sierra)を使用されているようです。

下記はHomebrewがmysql@5.7をインストールするために使うスクリプトです。
https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/mysql@5.7.rb

  bottle do
    rebuild 2
    sha256 arm64_big_sur: "828675045ac442a6862d32f58a588a5d4c3c66bbc835a6492b3f2c4bab1ac367"
    sha256 big_sur:       "d698d7de62f5d7d3eef93c04c3ac2b7ba0aa2081f31f6617972b6c88a18a95e5"
    sha256 catalina:      "1bf3050f0ed024f54538ccf95d96a41536ab54d87e303d802f32b5c149eb8eb7"
    sha256 mojave:        "0240b57da7513b0082d251cc314a27022842fd588092a22088cd14eec9f1cc86"
  end

ご覧の通り、High Sierraのボトルがありません。なので、mysql@5.7をインストールできないのだと思います。mysql@5.7をインストールするには、少なくとも、10.14(Mojave)以上を使う必要があると思います。

ちなみに、mysql@5.6も10.14(Mojave)以上のボトルしか提供されていないようです。
https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/mysql@5.6.rb

  bottle do
    sha256 big_sur:  "f11cd8885dc59020425bbdad88911471bc24de21810cbfbbcb6d9dd936473a85"
    sha256 catalina: "bbdc569f29b12fbcf5e877b15598b6adbbfa551df4ffdf8047832335b6dc829f"
    sha256 mojave:   "d254901fc740ede4295f3ff7323a5d142772caf6144f04480634e5a9bacab7cb"
  end
0Like

Your answer might help someone💌