cocoa pods 命令不执行command not found

 

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退出并保存 

原创作品,有问题可以留言讨论,谢谢....

 文章内容为本人亲测好使,如解决不了您的问题,请继续研究,如有雷同,纯属巧合

转载于:https://www.cnblogs.com/ccw-congcong/p/6732557.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值