美文网首页
Cocoapods Traceback (most recent

Cocoapods Traceback (most recent

作者: Flora_HAHA | 来源:发表于2020-05-27 10:20 被阅读0次

    转的

    原文地址原文地址原文地址原文地址原文地址原文地址原文地址

    Traceback (most recent call last):
    5: from /usr/local/bin/pod:23:in <main>' 4: from /usr/local/bin/pod:23:inload'
    3: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/bin/pod:55:in <top (required)>' 2: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/command.rb:49:inrun'
    1: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/command.rb:130:in verify_minimum_git_version!' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/command.rb:118:ingit_version': Failed to extract git version from git --version ("xcrun: error: active developer path ("/Applications/Xcode11.1.app/Contents/Developer") does not exist\nUse sudo xcode-select --switch path/to/Xcode.app to specify the Xcode that you wish to use for command line developer tools, or use xcode-select --install to install the standalone command line developer tools.\nSee man xcode-select for more details.\n") (RuntimeError)

    image.png

    解决

    1.没有安装git
    可以在终端执行:xcode-select --install。如果你的电脑系统更新了,有可能这个命令解决不了你的问题,那么,这时候需要到git官网下载安装,下载链接https://git-scm.com/download/mac

    2.关联路径不对
    这个问题可以使用命令:sudo xcode-select --switch /Users/feiwei/Downloads/Xcode.app,其实这个命令就是指定Xcode的安装目录。如果你不知道安装路径,或者不想用命令,Xcode -->Preferences-->Locations并选择Command Line Tools,看看是否选择了当前Xcode版本。
    Xcode偏好设置:


    image.png image.png

    相关文章

      网友评论

          本文标题:Cocoapods Traceback (most recent

          本文链接:https://www.haomeiwen.com/subject/hngiahtx.html