/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`的更多相关文章
- /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 ...
随机推荐
- Tomcat运行机制
Tomcat其实就是一个servlet的容器,因此,它在运行过程中,首先要做以下事情: 1.实现servlet api规范.如request.response.cookie.session等,容器对其 ...
- Winform中将Bitmap对象通过picture显示图片
场景 使用Zxing生成二维码时,返回的是Bitmap,现在要将其显示. Winform中显示照片的控件是pictureBox 实现 //二维码要存储的内容 string codeString = & ...
- 【linux】【ELK】搭建Elasticsearch+Logstash+Kibana+Filebeat日志收集系统
前言 ELK是Elasticsearch.Logstash.Kibana的简称,这三者是核心套件,但并非全部. Elasticsearch是实时全文搜索和分析引擎,提供搜集.分析.存储数据三大功能:是 ...
- WordPress后台地址路径修改方法
用过WordPress后台的,其实都知道http://域名目录/wp-login.php就是登录地址,如果这时候使用暴力破解,很可能破解密码(这就有些想象力了),下面芝麻带你看看如何自定义美观的地址. ...
- jmeter基础使用
1.ServerAgent是服务端的插件2.下载成功后,复制JmeterPlugins-Extras.jar和JmeterPlugins-Standard.jar两个文件,放到jmeter安装文件中的 ...
- event.stopPropagation()、event.preventDefault()与return false的区别
做小demo时经常用到return false来取消默认事件,但一直不是很懂它和preventDefault()等的区别,今天查了查文档和大神们的博客,在这里对相关知识点做一个总结 首先开门见山,总结 ...
- 【SQL server基础】object_id()函数
在SQLServer数据库中,如果查询数据库中是否存在指定名称的索引或者外键约束等,经常会用到object_id('name','type')方法,做笔记如下: ? 语法:object_id('obj ...
- 【ADO.NET--MVC】初学MVC(MVC入门)(1)
最近一直在学MVC,本来今天想开始做项目了,但是一下手才发现还有好多好多都不懂,虽然想照搬别人的模板,但是还是觉得很虚,这也不懂哪也不懂.看来学习一门技术断不是那么简单,只要随便套套模板,看看别人代码 ...
- 节点操作--JavaScript
1 - 概念 网页中的所有内容都是节点(标签.属性.文本.注释),在DOM中,节点使用node来表示. HTML DOM树中的所有节点均可通过JS进行访问,所有HTML元素(节点)均可被修改,也可以创 ...
- python爬取哦漫画
import requests from lxml import etree from bs4 import BeautifulSoup import os from selenium import ...