bogon:~ mrbtios01$ cd Desktop/改版app/lingMoney新改版的
//当出现如下问题时:
bogon:lingMoney新改版的 mrbtios01$ vim podfile
bogon:lingMoney新改版的 mrbtios01$ pod imstall
-bash: pod: command not found
//1,删除cocoapods
bogon:lingMoney新改版的 mrbtios01$ sudo gem uninstall cocoapods
Password:
Select gem to uninstall:
1. cocoapods-0.39.0
2. cocoapods-1.0.1
3. cocoapods-1.1.1
4. cocoapods-1.2.0
5. All versions
> 5
Successfully uninstalled cocoapods-0.39.0
Successfully uninstalled cocoapods-1.0.1
Successfully uninstalled cocoapods-1.1.1
Remove executables:
pod, sandbox-pod
in addition to the gem? [Yn] y
Removing pod
Removing sandbox-pod
Successfully uninstalled cocoapods-1.2.0
//2.重装cocoapods
bogon:lingMoney新改版的 mrbtios01$ sudo gem install -n /usr/local/bin cocoapods Successfully installed xcodeproj-1.4.4
Fetching: ruby-macho-1.1.0.gem (100%)
Successfully installed ruby-macho-1.1.0
Fetching: molinillo-0.5.7.gem (100%)
Successfully installed molinillo-0.5.7
Fetching: cocoapods-trunk-1.2.0.gem (100%)
Successfully installed cocoapods-trunk-1.2.0
Fetching: cocoapods-core-1.2.1.gem (100%)
Successfully installed cocoapods-core-1.2.1
Fetching: cocoapods-1.2.1.gem (100%)
Successfully installed cocoapods-1.2.1
Parsing documentation for xcodeproj-1.4.4
Installing ri documentation for xcodeproj-1.4.4
Parsing documentation for ruby-macho-1.1.0
Installing ri documentation for ruby-macho-1.1.0
Parsing documentation for molinillo-0.5.7
Installing ri documentation for molinillo-0.5.7
Parsing documentation for cocoapods-trunk-1.2.0
Installing ri documentation for cocoapods-trunk-1.2.0
Parsing documentation for cocoapods-core-1.2.1
Installing ri documentation for cocoapods-core-1.2.1
Parsing documentation for cocoapods-1.2.1
Installing ri documentation for cocoapods-1.2.1
6 gems installed
//3.这句话很重要(写了就能使,不要问为什么-----)
bogon:lingMoney新改版的 mrbtios01$ sudo chmod +rx /usr/local/bin
bogon:lingMoney新改版的 mrbtios01$ pod --version
1.2.1
bogon:lingMoney新改版的 mrbtios01$ pod search AFNetworking
Creating search index for spec repo 'master'..
Done!
^[[Abogon:lingMoney新改版的 mrbtios01$ pod install
总结:进入podfile i编辑 esc退出编辑 :wq退出并保存
原创作品,有问题可以留言讨论,谢谢....
文章内容为本人亲测好使,如解决不了您的问题,请继续研究,如有雷同,纯属巧合