解决Mac OS X 10.11更新以后Cococapods找不

2016-11-20  本文已影响10人  coderST

****升级****10.11****的系统以后执行**** pod install ****的时候报错**

: command not found: pod

1.检查gem 的数据源 gem sources -l

http://ruby.taobao.org

可能是跟iOS9一样,Capitan 10.11禁止了http的请求了,改成https的协议头就好了

gem sources --remove http://ruby.taobao.org/

gem sources -a https://ruby.taobao.org/

### 2.****重新安装****pod

sudo gem install cocoapods

如果再次报错了

ERROR: While executing gem ... (Errno::EPERM)

Operation not permitted - /usr/bin/xcodeproj

###3.****使用指令****,****安装成功

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

如果上面的操作完以后还是报错的话:如下:

ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod

1.

mkdir -p $HOME/Software/ruby

export GEM_HOME=$HOME/Software/ruby

gem install cocoapods

export PATH=$PATH:$HOME/Software/ruby/bin
sudo gem update --system

2、install命令执行成功后,执行:

pod setup

Setting up CocoaPods master repo

.........

Setup completed

cd ~/.cocoapods

du -sh*

pod search AFNetworking

上一篇 下一篇

猜你喜欢

热点阅读