CocoaPods:无法找到可执行文件`git`

use*_*351 0 ios cocoapods

我已经成功安装了一个pod(SDWebImage),现在正在尝试添加名为"MFSideMenu"的库.我的Podfile看起来如下:

platform :ios, '6.0'

pod 'SDWebImage', '3.2'
pod 'MFSideMenu'
Run Code Online (Sandbox Code Playgroud)

当我执行"pod安装"时,我得到以下(错误 - )输出:

Analyzing dependencies
Downloading dependencies
Installing MFSideMenu (0.4.8)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems                 
/custom_require.rb:31: command not found: git config remote.origin.url
[!] Unable to locate the executable `git`
Run Code Online (Sandbox Code Playgroud)

有谁知道这里的问题是什么?

提前致谢!

Mar*_*orn 9

我有同样的问题,但安装了git - 我按照这里概述的解决方法:https://github.com/CocoaPods/CocoaPods/issues/6923

Windows二进制文件以.exe结尾,而CocoaPods似乎没有考虑到这一点,因此编辑文件executable.rb(我的文件<RubyLocation>\lib\ruby\gems\2.5.0\gems\cocoapods-1.5.3\lib\cocoapods)并更改以下行:

bin = File.expand_path(program, path)

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

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

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

解决了它.

  • 先生,是我的英雄 - 谢谢你:) (3认同)