"pod init"给出错误"-bash:pod:未找到命令"; [英] "pod init" giving error "-bash: pod: command not found"
问题描述
我正在尝试为Xcode项目创建一个Podfile,以实现Firebase兼容性,但是当我尝试在存储Xcode项目的同一文件中创建该Podfile时,请使用终端并输入"pod init",它会抛出错误"-bash:pod:找不到命令".
I am trying to create a Podfile for my Xcode project for Firebase compatibility, but when I try to create it within the same file that my Xcode project is stored in, using my terminal and typing "pod init", it throws the error "-bash: pod: command not found".
就我所知,我使用的是Sierra 10.12.1,它是最新的OSX,但是我不熟悉Podfiles的使用,因此,这里的任何帮助都将非常有用,谢谢.
I am up to date on OSX as far as I'm aware, using Sierra 10.12.1, but I am unfamiliar with the use of Podfiles, so any help here would be great, thanks.
推荐答案
好像没有安装CocoaPods.
Looks like you didn't install CocoaPods.
为此,您可以通过宝石红宝石安装它,如下所示:
To do that you install it through ruby gems, like this:
sudo gem install cocoapods
如果您没有管理员权限,请尝试:
If you don't have admin privileges, try:
gem install cocoapods --user-install
这篇关于"pod init"给出错误"-bash:pod:未找到命令";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!