0

前提・実現したいこと

マックのターミナルで pod setup を実行:

Setting up CocoaPods master repo

Realm を CocoaPods で setup して使いたい。


発生している問題・エラーメッセージ

エラーの内容:

xcrun: error: active developer path ("/Applications/Xcode9.0.1.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
[!] The `master` repo is not a git repo.

試したこと

  1. xcode-select --install
  2. gem バージョンアップ
    現在の gem version → 2.6.7
  3. ネット上の検索
  4. Mac OSのバージョンをダウングレード
    macOS High Sierra から Sierra10.12.6。

補足情報 (OS, ツールのバージョンなど)

  • MacBookPro OS は Sierra10.12.6
  • Swift 4
6
  • Xcodeが正しく認識されていません。Xcodeを再インストールして1度起動すれば直るように思います。xcode-select --installはすでに試されたということですが、そのコマンド成功してますか?何かエラーが出ませんでしたか? 2017年11月13日 1:32
  • エラーは次のようなものでした。①xcode-select --installを実行すると xcode-select: error: command line tools are already installed, use "Software Update" to install updates ②「 gem update」を実行すると Updating installed gems Updating activesupport Fetching: concurrent-ruby-1.0.5.gem (100%) ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory. 自分のパソコンですけど、書き込みできないのでしょうか。
    – fukuta
    2017年11月13日 6:05
  • /Library以下のディレクトリはシステムディレクトリなので変更には管理者権限が必要ですね。sudoをつければ成功すると思いますが、そこは今のところ問題に関係ないと思います。gitコマンドは成功しますか? 2017年11月13日 6:15
  • Xcodeをインストールし直しても同じエラーでした。gitコマンドに対しても下記のエラーが出ます。xcrun: error: active developer path ("/Applications/Xcode9.0.1.app/Contents/Developer") does not exist Use sudo xcode-select --switch path/to/Xcode.app to specify the Xcode that you wish to use for command line developer tools, or use xcode-select --install to install the standalone command line developer tools. See man xcode-select for more details.
    – fukuta
    2017年11月13日 6:54
  • Xcodeが起動するならXcode>Preference...>LocationsのCommand Line Toolsのところで適切なXcodeを選択してください。まずXcodeのパスが"/Applications/Xcode9.0.1.appとなっているのを直す必要があります。Xcode9.0.1.appというのはすでに無いんですよね? 2017年11月13日 6:58

0

この質問に回答するには、ログインする必要があります。

のタグが付いた他の質問を参照する。