pod install -bash: pod: command
2017-03-28 本文已影响771人
小PY
1、在常规使用cocoapods添加管理三方类库时,竟然报错!看图感受一下
![](https://img.haomeiwen.com/i1015028/d4baa48d40c272ae.png)
![](https://img.haomeiwen.com/i1015028/2f39e8c0c10700fb.png)
![](https://img.haomeiwen.com/i1015028/107f6a34afb383f8.png)
2、还以为是本地cocoapods 出现了问题,然而并不是,在各种研究搜索之后终于找到了有效的解决办法。输入cd回到根目录,逐次输入以下语句:
mkdir -p $HOME/Software/ruby
export GEM_HOME=$HOME/Software/ruby
gem install cocoapods(执行这句话时会出现图2-1的效果)
export PATH=$PATH:$HOME/Software/ruby/bin
pod --version
![](https://img.haomeiwen.com/i1015028/1d0a9d4d507f0713.png)
以上语句执行完毕后这样,图2-2
![](https://img.haomeiwen.com/i1015028/b59bba0334aa9ec6.png)
3、按照图3-1左侧红框框内的语句再执行一遍就OK啦!看图说话:
![](https://img.haomeiwen.com/i1015028/225df0bd7421bbf3.png)