React Native 错误 pod 安装,Debian 10

Posted

技术标签:

【中文标题】React Native 错误 pod 安装,Debian 10【英文标题】:React Native error pod install, Debian 10 【发布时间】:2020-04-09 14:52:29 【问题描述】:

React Native 0.62, 操作系统 Debian 10 Buster

我正在尝试为 React Native 项目运行 ios 模拟器。为此,我在 ios 文件夹中运行“pod install”并发现错误:

...

./configure --host arm-apple-darwin

...

checking for arm-apple-darwin-gcc...  -arch armv7 -isysroot 
checking whether the C compiler works... no
/usr/bin/bash: line 24: xcrun: command not found
/usr/bin/bash: line 24: xcrun: command not found
/home/user/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing: Unknown `--is-lightweight' option
Try `/home/user/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/home/user/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6':
configure: error: C compiler cannot create executables
See `config.log' for more details

如何解决?

【问题讨论】:

【参考方案1】:

不幸的是,无法在 Linux 上运行 Xcode、iOS 模拟器或如您所见的 CocoaPods。 CocoaPods 虽然本身是一个 ruby​​ gem,但仍然依赖于 Xcode 命令行工具(例如,xcrun,据报告在上面的输出中找不到)。

也许有虚拟化选项 - 我自己没有尝试过。

【讨论】:

我在 Debian 上从 brew install cocoapods 安装了 CocoaPods。也许已经有解决此错误的任何解决方案? 很遗憾,这不是错误。 您能推荐任何带有 MacOS 的云来测试应用吗? 我没有任何经验 - 值得在这个或另一个论坛上问另一个问题。

以上是关于React Native 错误 pod 安装,Debian 10的主要内容,如果未能解决你的问题,请参考以下文章

React Native - pod 安装问题“无法加载此类文件.......node_modules/react-native/scripts/react_native_pods”

React-native iOS 不显示图像(pod 问题)

react-native - Pod 安装卡在克隆规范 repo

macOS 上 React Native 的 Pod 安装问题

React Native iOS 模块 Pod 依赖

带有 Flipper pod 和安装后挂钩的 React Native v0.62.2 中的问题