/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 from
git --version("xcrun: error: active developer path (\"/Users/feiwei/Desktop/Xcode.app/Contents/Developer\") does not exist\nUse
sudo xcode-select --switch path/to/Xcode.appto specify the Xcode that you wish to use for command line developer tools, or use
xcode-select --installto install the standalone command line developer tools.\nSee
man 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`的更多相关文章
- /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 worl ...
- Ubuntu 16.04在搭建Redis Cluster搭建时,使用gem install redis时出现:ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /var/lib/gems/2.3.0 directory.
注意:千万不要使用sudo来执行gem install redis. 解决方法: sudo apt-get update sudo apt-get install git-core curl zlib ...
- mac下/usr/local/bin No such file or directory问题解决
在对composer进行全局配置时,执行 sudo mv composer.phar /usr/local/bin/composer 时,mac报错:/usr/local/bin No such fi ...
- nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
iwangzheng.com tty:[0] jobs:[0] cwd:[/opt/nginx/conf] 12:45 [root@a02.cmsapi]$ /usr/local/nginx/sbin ...
- mogilefsdBUG mogilefsd[15624]: crash log: Modification of a read-only value attempted at /usr/local/share/perl5/Sys/Syscall.pm line 227
mogilefsd[15624]: crash log: Modification of a read-only value attempted at /usr/local/share/perl5/S ...
- redis集群错误解决:/usr/lib/ruby/gems/1.8/gems/redis-3.0.0/lib/redis/client.rb:79:in `call': ERR Slot 15495 is already busy (Redis::CommandError)
错误信息: /usr/lib/ruby/gems/1.8/gems/redis-3.0.0/lib/redis/client.rb:79:in `call': ERR Slot 15495 is al ...
- 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'> ...
- ERR:/usr/local/lib/libcrypto.so.1.0.0: no version information available
解决方法: locate libssl.so.1.0.0 sudo rm /usr/local/lib/libssl.so.1.0.0 sudo ln -s /lib/x86_64-linux ...
- 问题处理:Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib (LoadError)
进入rails 文件夹, terminal输入rails console报告❌. 类似下面的 Running via Spring preloader Traceback (most recent c ...
随机推荐
- I don't Blame You that You don't Understand Me
I don't Blame You that You don't Understand Me Every one has a dead corner in himself, with no entry ...
- System类入门学习
System类 System类代表系统,系统级的很多属性和控制方法都放置在该类的内部.该类位于java.lang包.其包含一些有用的字段和方法,不能被实例化 system中包含了in.out和err三 ...
- Linux 笔记 - 第七章 Vi 和 Vim 编辑器
博客地址:http://www.moonxy.com 一.前言 Vi 与 Vim 都是多模式编辑器,是 Linux 中必不可少的工具.不同的是 Vim 是 Vi 的升级版本,它不仅兼容 Vi 的所有命 ...
- caffe学习一:ubuntu16.04下跑Faster R-CNN demo (基于caffe). (亲测有效,记录经历两天的吐血经历)
兜兜转转,兜兜转转; 一次有一次,这次终于把Faster R-CNN 跑通了. 重要提示1:在开始跑Faster R-CNN之前一定要搞清楚用的是Python2 还是Python3. 不然你会无限次陷 ...
- 提交任务到spark(以wordcount为例)
1.首先需要搭建好hadoop+spark环境,并保证服务正常.本文以wordcount为例. 2.创建源文件,即输入源.hello.txt文件,内容如下: tom jerry henry jim s ...
- at org.apache.jsp.WEB_002dINF.pages.login_jsp._jspInit( login_jsp.java:22)
SEVERE: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apac ...
- Spring入门(十四):Spring MVC控制器的2种测试方法
作为一名研发人员,不管你愿不愿意对自己的代码进行测试,都得承认测试对于研发质量保证的重要性,这也就是为什么每个公司的技术部都需要质量控制部的原因,因为越早的发现代码的bug,成本越低,比如说,Dev环 ...
- 用Promise处理异步函数
处理函数之间的异步问题,使其同步进行的其中一种方法,就是使用Promise.Promise在ES6中被提出. 使用示例如下: 假如有三个函数,要求按getone.gettwo.getthree的顺序执 ...
- 深入MYSQL随笔
(1)查询生命周期:从客户端到服务器,然后在服务器上进行解析,生成执行计划,执行,并返回给客户端.执行是整个生命周期中,最重要的阶段. (2)慢查询基础:优化数据访问,减少访问的数据行. (3)查询不 ...
- Mybatis基础知识点
1. Mybatis框架优缺点 优点: 1. 易于上手和掌握. 2. sql写在xml里,便于统一管理和优化. 3. 解除sql与程序代码的耦合. 4. 提供映射标签,支持对象与数据库的orm字段关系 ...