安装cocoa pods时出现Operation not permitted - /usr/bin/xcodeproj的问题

在更新完ruby,更换Ruby镜像--淘宝的那个镜像(https://ruby.taobao.org/ )已经不可用了。官方的需要FQ。所以我们现在用最新支持的ruby镜像(https://gems.ruby-china.org/)


安装cocoa pods时,

  在命令行中输入:

  安装:sudo gem install cocoapods报Operation not permitted - /usr/bin/xcodeproj这个错误,解决办法为:

sudo gem install -n /usr/local/bin cocoapods --pre 

这段命令代替

sudo gem install cocoa pods 

 就完美解决了


安装cocoapods的步骤为:

1、更新ruby   

sudo gem update --system

2、

更换Ruby镜像--淘宝的那个镜像(https://ruby.taobao.org/ )已经不可用了。官方的需要FQ。所以我们现在用最新支持的ruby镜像(https://gems.ruby-china.org/)

  需要的命令行:

  gem sources --remove https://rubygems.org/ 
  gem sources -a https://gems.ruby-china.org/ 
  gem sources -l  (用来检查使用替换镜像位置成功)

  出现

*** CURRENT SOURCES ***


https://gems.ruby-china.org/


则说明成功了


3、安装cocoapods  命令行: sudo gem install -n /usr/local/bin cocoapods --pre

终端打印:

MacintoshdeiMac:~ Mac$ sudo gem install -n /usr/local/bin cocoapods --pre  

ERROR:  SSL verification error at depth 1: unable to get local issuer certificate (20)

ERROR:  You must add /O=Digital Signature Trust Co./CN=DST Root CA X3 to your local trusted store

ERROR:  SSL verification error at depth 2: self signed certificate in certificate chain (19)

ERROR:  Root certificate is not trusted (/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA)

Successfully installed xcodeproj-1.4.2

Fetching: ruby-macho-0.2.6.gem (100%)

Successfully installed ruby-macho-0.2.6

Fetching: nap-1.1.0.gem (100%)

Successfully installed nap-1.1.0

Fetching: molinillo-0.5.4.gem (100%)

Successfully installed molinillo-0.5.4

Fetching: gh_inspector-1.0.2.gem (100%)

Successfully installed gh_inspector-1.0.2

Fetching: fourflusher-2.0.1.gem (100%)

Successfully installed fourflusher-2.0.1

Fetching: escape-0.0.4.gem (100%)

Successfully installed escape-0.0.4

Fetching: cocoapods-try-1.1.0.gem (100%)

Successfully installed cocoapods-try-1.1.0

Fetching: netrc-0.7.8.gem (100%)

Successfully installed netrc-0.7.8

Fetching: cocoapods-trunk-1.1.2.gem (100%)

Successfully installed cocoapods-trunk-1.1.2

Fetching: cocoapods-stats-1.0.0.gem (100%)

Successfully installed cocoapods-stats-1.0.0

Fetching: cocoapods-search-1.0.0.gem (100%)

Successfully installed cocoapods-search-1.0.0

Fetching: cocoapods-plugins-1.0.0.gem (100%)

Successfully installed cocoapods-plugins-1.0.0

Fetching: cocoapods-downloader-1.1.3.gem (100%)

Successfully installed cocoapods-downloader-1.1.3

Fetching: cocoapods-deintegrate-1.0.1.gem (100%)

Successfully installed cocoapods-deintegrate-1.0.1

Fetching: fuzzy_match-2.0.4.gem (100%)

Successfully installed fuzzy_match-2.0.4

Fetching: cocoapods-core-1.2.0.beta.1.gem (100%)

Successfully installed cocoapods-core-1.2.0.beta.1

Fetching: cocoapods-1.2.0.beta.1.gem (100%)

Successfully installed cocoapods-1.2.0.beta.1

Parsing documentation for xcodeproj-1.4.2

Installing ri documentation for xcodeproj-1.4.2

Parsing documentation for ruby-macho-0.2.6

Installing ri documentation for ruby-macho-0.2.6

Parsing documentation for nap-1.1.0

Installing ri documentation for nap-1.1.0

Parsing documentation for molinillo-0.5.4

Installing ri documentation for molinillo-0.5.4

Parsing documentation for gh_inspector-1.0.2

Installing ri documentation for gh_inspector-1.0.2

Parsing documentation for fourflusher-2.0.1

Installing ri documentation for fourflusher-2.0.1

Parsing documentation for escape-0.0.4

Installing ri documentation for escape-0.0.4

Parsing documentation for cocoapods-try-1.1.0

Installing ri documentation for cocoapods-try-1.1.0

Parsing documentation for netrc-0.7.8

Installing ri documentation for netrc-0.7.8

Parsing documentation for cocoapods-trunk-1.1.2

Installing ri documentation for cocoapods-trunk-1.1.2

Parsing documentation for cocoapods-stats-1.0.0

Installing ri documentation for cocoapods-stats-1.0.0

Parsing documentation for cocoapods-search-1.0.0

Installing ri documentation for cocoapods-search-1.0.0

Parsing documentation for cocoapods-plugins-1.0.0

Installing ri documentation for cocoapods-plugins-1.0.0

Parsing documentation for cocoapods-downloader-1.1.3

Installing ri documentation for cocoapods-downloader-1.1.3

Parsing documentation for cocoapods-deintegrate-1.0.1

Installing ri documentation for cocoapods-deintegrate-1.0.1

Parsing documentation for fuzzy_match-2.0.4

Installing ri documentation for fuzzy_match-2.0.4

Parsing documentation for cocoapods-core-1.2.0.beta.1

Installing ri documentation for cocoapods-core-1.2.0.beta.1

Parsing documentation for cocoapods-1.2.0.beta.1

Installing ri documentation for cocoapods-1.2.0.beta.1

18 gems installed

到此安装成功!

  • 3
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值