LoginSignup
4
2

More than 1 year has passed since last update.

macOSをMontereyに上げたらcargo buildで「linking with `cc` failed」となった

Last updated at Posted at 2021-12-20

Mac初心者なので備忘録。

実行環境

macOS Monterey 12.1

エラー概要

先日 macOS をMontereyにアップデートしたのですが、それから cargo build 時に以下のようなエラーが出てビルドできなくなってしまいました。

error: linking with `cc` failed: exit status: 1

解決方法

どうもMontereyに上げたことでXcode Command Line Toolsが使えなくなったみたい。
以下のコマンドで入れ直します。

xcode-select --install

無事ビルドできるようになりました。
よかった。

macOSのメジャーバージョンを上げるときは毎回やったほうが良さそうですね。
勉強になりました。

参考

4
2
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
4
2