gpt4 book ai didi

ios - 操作系统 pod 安装错误。无法安装模块 glog

转载 作者:可可西里 更新时间:2023-11-01 05:04:15 25 4
gpt4 key购买 nike

我正在尝试将“react-native”从“0.50.4”升级到“0.55”。

当我运行 pod install 时,我收到一个错误

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`.

我是 react-native 的初学者,我无法在我的 iOS 项目中安装 pod。提前谢谢你。

最佳答案

大多数情况下,当您拥有多个 Xcode 开发版本时,就会发生这种情况。嗯,这就是发生在我身上的事情。您可以尝试将 xcode-select 路径重新配置/更改为默认的 Xcode.app:

首先检查你的 Xcode 应用名称

xcode-select -p

如果它不是 Xcode.app 则执行此操作:

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

之后再次运行 pod install

如果它已经设置为 Xcode.app 然后尝试以下操作:

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

我不需要这样做,因为前面的步骤已经奏效了,也许它对你有帮助:)

关于ios - 操作系统 pod 安装错误。无法安装模块 glog,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50448717/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com