CocoaPods: Unable to locate the executable `git`

后端 未结 2 721
鱼传尺愫
鱼传尺愫 2021-01-16 23:56

I\'ve already installed a pod successfully (SDWebImage) and now trying to add a Library called \"MFSideMenu\". My Podfile looks the following:

platform :ios,         


        
相关标签:
2条回答
  • 2021-01-17 00:19

    I had the same issue but had git installed - I followed the workaround outlined here: https://github.com/CocoaPods/CocoaPods/issues/6923

    Windows binaries end in .exe which CocoaPods doesn't seem to take into account, so editing the file executable.rb (mine was in <RubyLocation>\lib\ruby\gems\2.5.0\gems\cocoapods-1.5.3\lib\cocoapods) and changing the following lines:

    bin = File.expand_path(program, path)

    to

    bin = File.expand_path(program, path) exe = bin + ".exe"

    and

    if File.file?(bin) && File.executable?(bin)

    to

    if (File.file?(bin) && File.executable?(bin)) || (File.file?(exe) && File.executable?(exe))

    Resolved it.

    0 讨论(0)
  • 2021-01-17 00:33

    You don't have git installed. Most software distributed using CocoaPods uses github for hosting and git for distribution. You need to install git.

    0 讨论(0)
提交回复
热议问题