1:我的解决方法(已经解决)
sudo gem install -n /usr/local/bin cocoapods
2:如果不行,可以试试(我没试过)
sudo gem install -n /usr/local/bin cocoapods /
sudo chmod +rx /usr/local/bin
3:还是不行就试试:
第一步:删掉你已安装了的所有版本的Cocoapods;
第二步:修改 usr/local/bin/的系统权限。(一定得加上这一句:sudo chmod +rx /usr/local/bin)
sudo gem uninstall cocoapods
Select gem to uninstall:
1. cocoapods-0.36.0
2. cocoapods-0.38.2
3. cocoapods-0.39.0
4. All versions
> 4
Remove executables:
pod, sandbox-pod
in addition to the gem? [Yn]Y
sudo gem install -n /usr/local/bin cocoapods //等到下载安装完成
sudo chmod +rx /usr/local/bin
按了回车。赶紧输入:
pod --version
0.39.0
参考:
http://blog.csdn.net/shinian0009/article/details/51017952
网友评论