简体   繁体   English

cocoa pod 已安装,但未找到 pod 命令

[英]cocoa pods is install but pod command is not found

I have successfully installed cocoapods in my Mac OS 10.12.6.我已经在我的 Mac OS 10.12.6 中成功安装了 cocoapods。 But when I type ` pod init '但是当我输入 ` pod init '

It says pod command is not found.它说找不到 pod 命令。

I am using Xcode 8.3.3.我正在使用 Xcode 8.3.3。 For adding firebase to my project, I need to add a pod file to the project,but it is not working.为了将 firebase 添加到我的项目中,我需要向项目中添加一个 pod 文件,但它不起作用。

sudo gem install cocoapods 
Successfully installed cocoapods-1.8.4
Parsing documentation for cocoapods-1.8.4
Done installing documentation for cocoapods after 3 seconds
1 gem installed.

pod init
-bash: pod: command not found

I have solved the problem by typing this in the terminal.我已经通过在终端中输入这个解决了这个问题。 sudo gem install -n/usr/local/bin/ cocoapods Now my terminal can recognize pod command. sudo gem install -n/usr/local/bin/ cocoapods现在我的终端可以识别 pod 命令了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM