因为我要低版本的pod,所以卸载掉最新版的pod,重新安装低版本的。不会降低pod版本的朋友可以参考https://www.meetrue.com/archives/133
言归正传,在降低pod版本之后时候,用sudo gem install cocoapods -v 0.37.2出现问题
192:electricityshop XXXXX$ sudo gem install cocoapods -v 0.37.2
Password:
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/xcodeproj
这个问题貌似比较少见,我上次降低也未曾出现,这时候要制定路径给它像这样
XXXX$ sudo gem install -n /usr/local/bin cocoapods -v 0.37.2
Successfully installed xcodeproj-0.24.3
Fetching: cocoapods-core-0.37.2.gem (100%)
Successfully installed cocoapods-core-0.37.2
Fetching: claide-0.8.2.gem (100%)
Successfully installed claide-0.8.2
Fetching: cocoapods-0.37.2.gem (100%)
Successfully installed cocoapods-0.37.2
Parsing documentation for xcodeproj-0.24.3
Installing ri documentation for xcodeproj-0.24.3
Parsing documentation for cocoapods-core-0.37.2
Installing ri documentation for cocoapods-core-0.37.2
Parsing documentation for claide-0.8.2
Installing ri documentation for claide-0.8.2
Parsing documentation for cocoapods-0.37.2
Installing ri documentation for cocoapods-0.37.2
4 gems installed
看起来不错,检查一下
$ which pod
/usr/local/bin/pod
完美!