一、报错
Installing Flipper-Glog (0.3.6) 报错
configure: WARNING: 'missing' script is too old or missing
Invalid configuration `arm64-apple-darwin20.5.0': machine `arm64-apple' not recognized
configure: error: /bin/sh ./config.sub arm64-apple-darwin20.5.0 failed
Installing glog (0.3.5) 报错
二、解决方案
1、编辑./node_modules/react-native/scripts/react_native_pods.rb
将Flipper-Glog to 0.3.6改成0.3.9
2、编辑./node_modules/react-native/scripts/ios-configure-glog.sh
在CURRENT_ARCH="${CURRENT_ARCH}"
的下面增加以下两行
wget -O config.guess 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
wget -O config.sub 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD'
参考来源:https://github.com/facebook/react-native/issues/32033#issuecomment-902560416
参考来源:https://github.com/facebook/react-native/pull/30753/commits/9d66b702be27a2866bf9def08d57c8c5e18587dc
三、其他解决方案
方案一:
git config --global core.autocrlf false
方案二:
sudo xcode-select --switch /Applications/Xcode.app
cd ios && pod install