Open3

久々に個人Macを使ったら、brewができなくなっていた

siosuaaasiosuaaa

brewでinstallしようとしたら、エラーが出た。

❯ brew install hogehoge
Error: git: unknown or unsupported macOS version: :dunno
Error: 'git' must be installed and in your PATH!
Warning: You are using macOS 14.
We do not provide support for this pre-release version.
It is expected behaviour that some formulae will fail to build in this pre-release version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from MacHomebrew on Twitter.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.

Error: No developer tools installed.
Install the Command Line Tools:
  xcode-select --install

軽く調べてみると以下を打つと良いらしい

brew update-reset

でもbrew upgradeが実行されないので、いったんbrew doctorを打ってみる

❯ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: No Cask quarantine support available: unknown reason.
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  openssl@1.1

Warning: gettext files detected at a system prefix.
These files can cause compilation and link failures, especially if they
are compiled with improper architectures. Consider removing these files:
  /opt/homebrew/lib/libgettextlib.dylib
  /opt/homebrew/lib/libintl.dylib
  /opt/homebrew/include/libintl.h

Warning: Git could not be found in your PATH.
Homebrew uses Git for several internal functions, and some formulae use Git
checkouts instead of stable tarballs. You may want to install Git:
  brew install git

Warning: No developer tools installed.
Install the Command Line Tools:
  xcode-select --install


Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  terraform
  readline
  sqlite

Warning: Some installed formulae are not readable:
  libtermkey: unknown or unsupported macOS version: :dunno

  gmp: unknown or unsupported macOS version: :dunno

  libpng: unknown or unsupported macOS version: :dunno

  nettle: unknown or unsupported macOS version: :dunno

  glib: unknown or unsupported macOS version: :dunno

  readline: unknown or unsupported macOS version: :dunno

  sqlite: unknown or unsupported macOS version: :dunno

  gettext: unknown or unsupported macOS version: :dunno

  zstd: unknown or unsupported macOS version: :dunno

  tmux: unknown or unsupported macOS version: :dunno

  libssh: unknown or unsupported macOS version: :dunno

  pcre2: unknown or unsupported macOS version: :dunno

  tfenv: unknown or unsupported macOS version: :dunno

  pcre: unknown or unsupported macOS version: :dunno

  unbound: unknown or unsupported macOS version: :dunno

  neovim: unknown or unsupported macOS version: :dunno

  guile: unknown or unsupported macOS version: :dunno

  p11-kit: unknown or unsupported macOS version: :dunno

  fzf: unknown or unsupported macOS version: :dunno

  python@3.9: unknown or unsupported macOS version: :dunno

  gnutls: unknown or unsupported macOS version: :dunno

Warning: You are using macOS 14.
We do not provide support for this pre-release version.
It is expected behaviour that some formulae will fail to build in this pre-release version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from MacHomebrew on Twitter.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.
siosuaaasiosuaaa

書いてあることを実行

Warning: No Cask quarantine support available: unknown reason.

これは後で実行

Warning: Some installed formulae are deprecated or disabled.

open sslはもう使わないので削除するけどbrewが使えないので後でする。

Warning: gettext files detected at a system prefix.

rm /opt/homebrew/lib/libgettextlib.dylib
rm /opt/homebrew/lib/libintl.dylib
rm /opt/homebrew/include/libintl.h

Warning: Git could not be found in your PATH.

brew install git

つらつら実行される。

Warning: No developer tools installed.

xcode-select --install


インストールされていく。
・・・
完了

Warning: You have unlinked kegs in your Cellar.

なんかterraformのコマンドがとおらないのでおかしいと思ってた。
あとでやる。

後でやるやつはbrewに関係ないので、まずはbrewの確認

brew upgrade

うごいたwww

siosuaaasiosuaaa

doctorが言ってたopen sslを削除する。

brew uninstall openssl@1.1

terraformもなんか言ってたから削除する

brew uninstall terraform

再度doctorに見てもらったら指摘が減った

❯ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: You have an unnecessary local Cask tap.
This can cause problems installing up-to-date casks.
Please remove it by running:
  brew untap homebrew/cask

Warning: You have an unnecessary local Core tap!
This can cause problems installing up-to-date formulae.
Please remove it by running:
 brew untap homebrew/core

改めて言われたことを素直に実行

❯ brew untap homebrew/cask
Untapping homebrew/cask...
Untapped 1 command and 6881 casks (7,025 files, 422.4MB).
❯ brew untap homebrew/core
Untapping homebrew/core...
Untapped 3 commands and 7076 formulae (7,539 files, 855.3MB).

最後にdoctorに見てもらったら、もう大丈夫と言われた。

❯ brew doctor
Your system is ready to brew.

よかった〜