转自:http://blog.csdn.net/NSNirvana/article/details/46873071
ERROR: While executing gem ... (Errno::EPERM)
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.Git` named `master`.
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.
[!] /usr/bin/git clone http://git.oschina.NET/akuandev/Specs.git master
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
sudo xcode-select -switch /Applications/Xcode-beta.app/Contents/Developers
CocoaPods 0.38.0.beta.2 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
CocoaPods 0.38.0.beta.2 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
转自:http://blog.csdn.net/prl18353364833/article/details/53905487
在更新完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