LoginSignup
25
10

More than 5 years have passed since last update.

macOSをupdateしたらHomebrewが動作しない、あるいはXcode 8から9にupdate後にcarthage updateできない件

Posted at

環境

  • macOS Sierra 10.12.2(?) → 10.12.6
  • Xcode 8.3 → Xcode 9.2
  • carthage 0.22.0 → 0.27.0

経緯と現象と対応

1)Xcode 8から9へアップデートしようと重い腰をあげました(笑。

2)Xcode 9の動作要件としてmacOS Sierra 10.12.6が必要なのでOSをバージョンアップしました。

3)Xcode 8から9にアップデートしました。

ここで、ライブラリを最新化するために、carthage updateを実行しようとしたところ…

$ carthage update
*** Please update to the latest Carthage version: 0.27.0. You currently are on 0.22.0

carthageをアップデートしてください、というメッセージがでたので、brew upgradeを行おうとすると…

$ brew upgrade carthage
Error: Xcode alone is not sufficient on Sierra.
Install the Command Line Tools:
  xcode-select --install

『SierraではXcode単体では不十分です。コマンドラインツールをインストールしてください』という旨のエラーメッセージが。

言われた通りコマンドを叩きます。

$ xcode-select --install

インストーラーが起動するので、インストール。
スクリーンショット 2018-01-02 7.52.34.png

この後、
$ brew upgrade carthage
$ carthage update
を実行したら、今度は上手く行きました。

原因

macOSをアップデートしたら、毎回xcode-select --installを実行しないとダメなようです。

多分、El CapitanからSierraにアップデートした際にも同じ作業をやっていたのでしょうけど、すっかり忘れてました。:sweat_smile:

<参考リンク>
Web エンジニアが macOS Sierra にアップグレードしてやったこと

25
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
25
10