/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:118:in `git_version': Failed to extract git version from `git --version`

问题及分析

今天做项目的时候,执行pod update报了如下错误信息:

/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:118:in git_version‘: Failed to extract git version fromgit --version("xcrun: error: active developer path (\"/Users/feiwei/Desktop/Xcode.app/Contents/Developer\") does not exist\nUsesudo xcode-select --switch path/to/Xcode.appto specify the Xcode that you wish to use for command line developer tools, or usexcode-select --installto install the standalone command line developer tools.\nSeeman xcode-select` for more details.\n") (RuntimeError)

粗略一看,应该是找不到git。为什么找不到?首先,有可能没有安装git;其次,可能是关联路径不对。

解决方案

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版本。

简书:https://www.jianshu.com/u/fa72e27b5006
CSDN:https://blog.csdn.net/xiaocaoyu111

PS:本文原创发于微信公众号longyoung,关注并回复「51电子书」免费领取程序员必读经典电子书。

/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:118:in `git_version': Failed to extract git version from `git --version`

原文地址:https://www.cnblogs.com/longyoung/p/11696339.html

时间: 2024-11-06 22:50:35

/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:118:in `git_version': Failed to extract git version from `git --version`的相关文章

?/var/lib/gems/2.5.0/gems/seccomp-tools-1.3.0/lib/seccomp-tools/dumper.rb:125: warning: Insecure world writable dir /home/python/.local in PATH, mode 040777 解决方案

/var/lib/gems/2.5.0/gems/seccomp-tools-1.3.0/lib/seccomp-tools/dumper.rb:125: warning: Insecure world writable dir /home/python/.local in PATH, mode 040777 解决方案 问题描述: 在安装完 seccomp-tools 工具想使用的时候报错了如下错误: 该错误的意思是在 /home/python/.local 目录下具有写的权限是不安全的,因此我

Error: Could not stat() command file '/usr/local/nagios/var/rw/nagios.cmd'!

Error: Could not stat() command file '/usr/local/nagios/var/rw/nagios.cmd'! 解决方法: setenforce 0 Error: Could not stat() command file '/usr/local/nagios/var/rw/nagios.cmd'!,码迷,mamicode.com Error: Could not stat() command file '/usr/local/nagios/var/rw/

mac下/usr/local/bin No such file or directory问题解决

在对composer进行全局配置时,执行 sudo mv composer.phar /usr/local/bin/composer 时,mac报错:/usr/local/bin No such file or directory . 分析原因,在finder中command+shift+G进入目录,确实也找不到 /usr/local/bin/composer ,包括在终端中也进不到该目录. 参考:https://stackoverflow.com/questions/25654731/usr-

./redis-trib.rb 报错:/usr/local/rvm/gems/ruby-2.4.2/gems/redis-4.0.1/lib/redis/client.rb:119:in `call': ERR Slot 0 is already busy (Redis::CommandError)

错误提示是 slot插槽被占用了(这是 搭建集群前时,以前redis的旧数据和配置信息没有清理干净.) 解决方案是 用redis-cli 登录到每个节点执行  flushall  和 cluster reset  就可以了. 然后重新执行群集脚本命令: ./redis-trib.rb create --replicas 1 192.168.*.*:7001 192.168.*.*:7002 192.168.*.*:7003 192.168.*.*:7004 192.168.*.*:7005  1

error: <class 'xml.parsers.expat.ExpatError'>, syntax error: line 1, column 0: file: /usr/local/lib/python2.7/xmlrpclib.py line: 557

当linux设备上开启sonar6.2时, supervisorctl status报如下错误: error: <class 'xml.parsers.expat.ExpatError'>, syntax error: line 1, column 0: file: /usr/local/lib/python2.7/xmlrpclib.py line: 557 关闭sonar6.2时,报如下错误: error: <class 'socket.error'>, [Errno 113]

libpcre.so: /lib64/libpcre.so.0 /usr/local/lib/libpcre.so /usr/local/lib/libpcre.so.1

安装ganglia # gmond -t | tee /usr/local/etc/gmond.conf gmond: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory 解决方法 执行如下命令: whereis libpcre.so.1 显示如下: libpcre.so: /lib64/libpcre.so.0 /usr/loc

dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib

问题描述: 本地想看下php的版本 执行php -v ,出现如下错误: dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib Referenced from: /usr/local/bin/php Reason: image not found 网上找了各种办法: 用install_name_tool的方式,动态修改依赖的版本,提示can't open input file: /usr/local/b

/usr/local/ssl/lib/libssl.a: error adding symbols: Bad value

一.背景 编译第三方库A的时候提示依赖openssl库. 二.编译openssl库 去官网下载最新版本的openssl-1.0.2l.tar.gztar -zxvf openssl-1.0.2l.tar.gzcd openssl-1.0.2l ./config make make install 完成编译,默认openssl的库安装在/usr/local/ssl目录下. 三.引用openssl库 第三方库[A]编译引用openssl的时候(make的时候),提示这个错误: /usr/local/

../gems/json-1.8.0/lib/json/common.rb:67: [BUG] Segmentation fault

在执行rails 命令时出现: [email protected]:~/ashelf$ rails s /home/diudiugirl/.rvm/gems/ruby-1.9.3-p545/gems/json-1.8.0/lib/json/common.rb:67: [BUG] Segmentation fault ruby 1.9.3p545 (2014-02-24 revision 45159) [x86_64-linux] -- Control frame information ----