LoginSignup
2
1

More than 3 years have passed since last update.

`react-native init`後のpod installでglogに関してエラーが出た時の対処

Last updated at Posted at 2020-02-01

現象

あるMac環境で下記のコマンドを実行した時、glogでエラーが発生し進めなくなった。


react-native init MyTSProject --template react-native-template-typescript
cd ./MyTSProject/ios && pod install

環境

  • OS: Mohave 10.14.6
  • Xcode: 11.2
  • react-native: 0.61.5

解決策

本件の場合、xcode-selectを設定し直したら解決した。

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

解決策の詳細

このイシューによると、glogはXcodeへのパスにスペースが入ってるとうまく動かないようである。

そうなっていないか、Xcodeへのパスを調べる。

xcode-select --print-path

/Library/Developer/CommandLineToolsであった。スペースは入っていないが、よくある設定ではない(普通は/Applications/Xcode.app/Contents/Developerとかになっている)。これはCommandLineToolsを自力インストールした場合の設定とのこと。この場合のサポートがglogはうまくできていないということかもしれない。

下記を実行して、よくある設定に戻すことで解決した。

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

参考

下記の記事には別の対処策が記載されている。

【react-native】pod instal 時の glog(0.3.5) でのエラー
https://qiita.com/fujimaring/items/2e7ec54ba6d4a6703c26

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