我无法安装Pod

时间:2020-05-19 12:10:39

标签: macos cocoapods

我无法Pod安装。 这是错误。 我要你帮我。

 xcrun: error: SDK "iphoneos" cannot be located
    xcrun: error: SDK "iphoneos" cannot be located
    xcrun: error: SDK "iphoneos" cannot be located
    xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'
    /Users/dan/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing: Unknown `--is-lightweight' option
    Try `/Users/dan/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 `/Users/dan/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6':
    configure: error: C compiler cannot create executables
    See `config.log' for more details

3 个答案:

答案 0 :(得分:3)

进入Xcode>“偏好设置”>“位置”。

检查是否选择了命令行工具,而不是空白。

enter image description here

答案 1 :(得分:3)

那个错误表明 C 编译器不能工作。

在设置新机器时请确保您有合适的 Xcode,这里修复了 iPhone sdk 问题。

运行这个

<块引用>

sudo xcode-select --print-path

如果安装了 XCode,您应该会看到错误的安装路径,例如 /Library/Developer/ 或类似内容:很可能您的 XCode 安装位于其他位置 - 例如在 /Applications/ 文件夹中。如果是这样,您可以通过键入以下命令来解决您的问题:

<块引用>

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

感谢:

Click for detail

答案 2 :(得分:0)

如果其他解决方案不起作用。

在主项目文件夹中尝试以下内容

git config --global core.autocrlf false

那么,

cd ios
pod install

它对我有用