LoginSignup
35
30

More than 3 years have passed since last update.

Catalinaにアップデート後のhomebrewの挙動(2019/10/09現在)

Posted at

とうとうやってきました!Catalina!早速アップデートしたので開発環境も更新していきます!
先に注意事項ですが今回のアップデートで最後まで終了するのに 5時間 程度要しました.wifi環境や各ローカル環境によってかかる時間は変わると思いますが,様子を見ながら時間に余裕がある時にアップデートする事をオススメします.

環境

  • macOS Catalina 10.15

動作確認

とりあえずhomebrewが動作するか確認してみます.

terminal
-> % brew -v
Homebrew 2.1.10
Homebrew/homebrew-core (git revision 78520; last commit 2019-09-28)
Homebrew/homebrew-cask (git revision 1ca38; last commit 2019-09-28)

前回しっかり整えておいたからなのか,今回は動くようですね!

brew upgrade

では今までに入れてきたパッケージをアップデートしてみましょう!
ここでは今までに入れてきたパッケージが多いほど時間がかかる可能性があるので,時間がある時にやることをお勧めします.

-> % brew upgrade
Updating Homebrew...
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.

ちょっとした余興ですが,cmakeのアップデートを覗いてみます.

==> Upgrading cmake
==> Downloading https://homebrew.bintray.com/bottles/cmake-3.15.4.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/46/46d8b2170e1bc872f5d4548a730bd7829347189aa8c50843343ff2f0e4e356e4?__gda__=exp=1570593359~hmac=d2e0dee5a3c0c1
######################################################################## 100.0%
==> Pouring cmake-3.15.4.catalina.bottle.tar.gz
==> Caveats
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/cmake
==> Summary
🍺  /usr/local/Cellar/cmake/3.15.4: 5,800 files, 53.4MB
Removing: /usr/local/Cellar/cmake/3.15.3... (5,800 files, 53.2MB)
Removing: /Users/user_name/Library/Caches/Homebrew/cmake--3.15.3.mojave.bottle.tar.gz... (14.9MB)
Removing: /usr/local/Cellar/shared-mime-info/1.13.1... (85 files, 4.7MB)
Removing: /Users/user_name/Library/Caches/Homebrew/shared-mime-info--1.13.1.mojave.bottle.tar.gz... (1.2MB)
Removing: /usr/local/Cellar/glib/2.62.0_1... (430 files, 15.3MB)
Removing: /Users/user_name/Library/Caches/Homebrew/glib--2.62.0.mojave.bottle.tar.gz... (4.5MB)
Removing: /Users/user_name/Library/Caches/Homebrew/glib--2.62.0_1.mojave.bottle.tar.gz... (4.5MB)

これを見るとMojave用のパッケージがRemoveされCatalina用のパッケージがダウンロードされていることが分かりますね!!

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: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  docker

Warning: Your Xcode (11.0) is outdated.
Please update to Xcode 11.1 (or delete it).
Xcode can be updated from the App Store.

Xcodeをアップデートしろと言われました(^_^;)
XcodeのアップデートはApp Storeでできます.

私はここが一番時間がかかりました...
2度もアップデート失敗したので一度削除して再インストールを試みました...軽く3時間は超えたと思います...

めちゃくちゃ時間かかったのでその間に他のwarningの解消をやってしまいます.
こちらはリンク切れのようなのでlinkを走らせて現状を確認します.

-> % brew link docker
Linking /usr/local/Cellar/docker/19.03.3...
Error: Could not symlink bin/docker
Target /usr/local/bin/docker
already exists. You may want to remove it:
  rm '/usr/local/bin/docker'

To force the link and overwrite all conflicting files:
  brew link --overwrite docker

To list all files that would be deleted:
  brew link --overwrite --dry-run docker

この状態で一度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: 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 brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  docker
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

毎度お馴染みxcode-select --installが出ましたね!解決順が前後じますが先にこちらを解決します.
これはおそらくある程度Xcodeのアップデートまたはインストールが正常に進んでないと出ないと思います.
なので時間のある方はXcodeのアップグレード → xcode-select --install → そのほかのwarning解消の順にするとスムーズに進むと思います.

-> % xcode-select --install
xcode-select: note: install requested for command line developer tools
-> % brew doctor
Error: You have not agreed to the Xcode license. Please resolve this by running:
  sudo xcodebuild -license accept

このエラーは初めて出ましたが,ライセンス云々書いてあって最後にsudo xcodebuild -license acceptを実行しろとあります.
このコマンドを実行するとパスワードが要求されるので入力して再度状態を確認します.

-> % sudo xcodebuild -license accept
Password:

-> % 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 unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  docker

はい!
では解決し切れていない残りのwarningを片付けます.

-> % brew link docker
Linking /usr/local/Cellar/docker/19.03.3...
Error: Could not symlink bin/docker
Target /usr/local/bin/docker
already exists. You may want to remove it:
  rm '/usr/local/bin/docker'

To force the link and overwrite all conflicting files:
  brew link --overwrite docker

To list all files that would be deleted:
  brew link --overwrite --dry-run docker

-> % brew link --overwrite docker
Linking /usr/local/Cellar/docker/19.03.3... 10 symlinks created

-> % brew doctor
Your system is ready to brew.

はい!一通り全て解決しました!
今までで1番の長丁場になってしまいました.ですが新機能も追加された事ですし,満喫していきましょう!!

35
30
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
35
30