16
10

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 3 years have passed since last update.

最新版のCLTをインストール済にもかかわらず、brewに「CLTをUpdateしろ」って怒られる場合の対処法

Last updated at Posted at 2019-12-10

現象

brew doctorを実行すると、下記のようなWarningが出力される。

% 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: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or
https://developer.apple.com/download/more/.

System Preferenceで更新を確認しても、すでに最新。Xcodeも最新版。謎。
Screen Shot 2019-12-10 at 17.27.06.png

この際のバージョン情報は下記のような感じ

% brew --config
HOMEBREW_VERSION: 2.2.1
ORIGIN: https://github.com/Homebrew/brew
HEAD: 2fe99bd9823fadea1cf918b1ed8366de7f40d336
Last commit: 28 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 9f1e6ddd2b9bf2e1df1d82c7da9187ff674ddfda
Core tap last commit: 4 hours ago
HOMEBREW_PREFIX: /usr/local
CPU: quad-core 64-bit skylake
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1100
Git: 2.24.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 10.15.1-x86_64
CLT: 1100.0.33.8
Xcode: 11.2.1

原因

XCodeとセットのCLTを導入している場合、何らかのきっかけでバージョン不整合が生じる模様。

対処法

単体版のCLTを導入する。
Warningに従って https://developer.apple.com/download/more/ にアクセスし、最新CLTのdmgをダウンロード -> インストールする。
Screen Shot 2019-12-10 at 17.20.26.png

導入後、CLTのバージョンが更新されていることを確認

% brew --config
HOMEBREW_VERSION: 2.2.1
ORIGIN: https://github.com/Homebrew/brew
HEAD: 2fe99bd9823fadea1cf918b1ed8366de7f40d336
Last commit: 28 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 9f1e6ddd2b9bf2e1df1d82c7da9187ff674ddfda
Core tap last commit: 4 hours ago
HOMEBREW_PREFIX: /usr/local
CPU: quad-core 64-bit skylake
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1100
Git: 2.24.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 10.15.1-x86_64
CLT: 11.2.0.0.1.1571444319 # <----- 更新されてる
Xcode: 11.2.1
CLT headers: 11.2.0.0.1.1571444319

Warningも解消されてる。

% brew doctor
Your system is ready to brew.
16
10
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
16
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?