问题及分析

今天做项目的时候,执行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`的更多相关文章

  1. /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 ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. 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'> ...

  8. 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 ...

  9. 问题处理:Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib (LoadError)

    进入rails 文件夹, terminal输入rails console报告❌. 类似下面的 Running via Spring preloader Traceback (most recent c ...

随机推荐

  1. C#开发BIMFACE系列27 服务端API之获取模型数据12:获取构件分类树

    系列目录     [已更新最新开发文章,点击查看详细] BIMFACE官方示例中,加载三维模型后,模型浏览器中左上角默认提供了“目录树”的功能,清晰地展示了模型的完整构成及上下级关系. 本篇介绍如何获 ...

  2. Springboot集成swagger2生成接口文档

    [转载请注明]: 原文出处:https://www.cnblogs.com/jstarseven/p/11509884.html    作者:jstarseven    码字挺辛苦的.....   一 ...

  3. Ubuntu系统添加用户权限

    一.首先创建一个新用户: sudo adduser hadoop 其次设置密码: sudo passwd hadoop 如果无法使用root密码,请输入如下命令: sudo passwd root 二 ...

  4. NLP(十七)利用tensorflow-serving部署kashgari模型

      在文章NLP(十五)让模型来告诉你文本中的时间中,我们已经学会了如何利用kashgari模块来完成序列标注模型的训练与预测,在本文中,我们将会了解如何tensorflow-serving来部署模型 ...

  5. Winform中实现ZedGraph新增自定义Y轴上下限、颜色、标题功能

    场景 Winform中实现ZedGraph的多条Y轴(附源码下载): https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/1001322 ...

  6. b161: NOIP2007 4.Hanoi双塔问题

    zerojudge  汉诺塔?图片问度娘 b161: NOIP2007 4.Hanoi双塔问题 题目: 给定A.B.C三根足够长的细柱,在A柱上放有2n个中间有孔的圆盘,共有n个不同的尺寸,每个尺寸都 ...

  7. 分别设计点类Point和圆类Circle,点类有两个私有数据纵坐标和横坐标;圆类有也两个私有数据圆心和半径,其中圆心是一个点类对象;要求如下所述: (1) 通过构造方法初始化数据成员,数据成员的初始化通过构造方法的参数传递;(2) 分别编写点和圆的输出函数,其中圆的输出包括圆心和半径的输出;点的输出x,y;

    题目相对简单: package naizi; public class Circle { //私有成员及构造方法 private Point center; private int r; Circle ...

  8. Day 14 查找文件 find

    find 查找方式 1.按照名称进行查找 [root@oldboyedu ~]# find ./ -name "*eth0" 2.按照名称查找(不区分大小写) [root@oldb ...

  9. Day 1 linux系统的发展史与虚拟机的安装过程

    自由软件之父 Richard M. Stallman 1984 发起了GNU组织 copyleft opensourc free GPL copyleft 代表无版权.copyright 代表有版权. ...

  10. elasticsearch document的索引过程分析

    elasticsearch专栏:https://www.cnblogs.com/hello-shf/category/1550315.html 一.预备知识 1.1.索引不可变 看到这篇文章相信大家都 ...