LoginSignup
0
2

More than 3 years have passed since last update.

複数のxcodeを入れたあとにpod installできない

Posted at

pod install errorが発生。

$ pod install
-> Installing glog (0.3.5)

 /Applications/Xcode 10.2.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk
   checking whether the C compiler works... no
   configure: error: in `/Users/user2/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-aefd1':
   configure: error: C compiler cannot create executables
   See `config.log' for more details
[!] /bin/bash -c
set -e
#!/bin/bash
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

背景

  • xcode 10.3が自動インストールされた。
  • それにより、iphone emulatorたちが消えた。復活のために10.2をインストール。
  • どうやらxcodeは複数インストールできるらしいので、複数xcodeをインストールしている状態に。
  • さぁios開発しよ → エラー!!

関連するのissueを発見

以下のコマンドでトラブル解消しているコメント多数。

sudo xcode-select --switch /Applications/Xcode.app

僕は複数インストールしたXcodeの名前を、 XCode(10.3)と XCode 10.2(10.2)としていました。
コマンドを叩いてもスペースを認識しないのか sudo xcode-select --switch /Applications/Xcode 10.2.app実行できませんでした。
この名前があかんのではないかとして、10.3を削除し、XCode 10.2 -> Xcodeとし、再度コマンド実行。

その後、 pod installを実行したところ、成功しました。

image.png

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