Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OS pod install error. Module glog cannot be installed

I'am trying to upgrade "react-native" from "0.50.4" to "0.55".

When I run pod install, i receive an error

checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for arm-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... no
checking for arm-apple-darwin-gcc...  -arch armv7 -isysroot 
checking whether the C compiler works... no
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
/Users/MacBook/Library/Caches/CocoaPods/Pods/Release/glog/0.3.4-1de0b/missing: Unknown `--is-lightweight' option
Try `/Users/MacBook/Library/Caches/CocoaPods/Pods/Release/glog/0.3.4-1de0b/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/Users/MacBook/Library/Caches/CocoaPods/Pods/Release/glog/0.3.4-1de0b':
configure: error: C compiler cannot create executables
See `config.log' for more details


[!] Automatically assigning platform `ios` with version `8.0` on target `quanta_react` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

I am a beginner in react-native and I can not make a pod install in my iOS project. Thank you in advance.

like image 614
Bassem Jlassi Avatar asked May 21 '18 12:05

Bassem Jlassi


2 Answers

Most of the times this happens when you have more then one Xcode development version. Well thats what happened to me. You can try re-configuring/changing the xcode-select path to default Xcode.app:

Check your Xcode app name first

xcode-select -p

If its not Xcode.app then do this:

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

after that run pod install again

If its already set to Xcode.app then try following:

cd node_modules/react-native/third-party/glog-* ../../scripts/ios-configure-glog.sh

i didn't need to do that because the step before worked already, maybe it helps you :)

like image 138
BigPun86 Avatar answered Oct 22 '22 15:10

BigPun86


I'm promoting Chase Holland's comment to an answer, because it solved my problem: remove any spaces you may have in your Xcode path.

/Applications/Xcode 10.0.app: will cause the error above

/Applications/Xcode10.0.app: will not

like image 15
sam-w Avatar answered Oct 22 '22 16:10

sam-w