运行pod install命令时终端上的Cocoapod安装问题

时间:2021-12-07 03:06:24

I am trying to install pod but it gives the following error when run the pod install command.

我正在尝试安装pod但是在运行pod install命令时出现以下错误。

$ pod
$ cd path of project
$ pod init
$ pod *** (which I want to install)
$ pod install

After those command I got this issue:

在那些命令后我得到了这个问题:

[!] Themaster` repo requires CocoaPods 1.0.0 - (currently using 0.39.0) Update CocoaPods, or checkout the appropriate tag in the repo.

[!] Themaster` repo需要CocoaPods 1.0.0 - (目前使用0.39.0)更新CocoaPods,或在repo中签出相应的标签。

[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.`

[!]你的Podfile已经清理了智能报价。为避免将来出现问题,您不应使用TextEdit进行编辑。如果您不使用TextEdit,则应在所选编辑器中关闭智能引号

2 个解决方案

#1


2  

The first error is complaining about the version of CocoaPods you have installed. You can verify your version with the following command:

第一个错误是抱怨你安装的CocoaPods的版本。您可以使用以下命令验证您的版本:

pod --version

Assuming you need to go to 1.0.0 or above, you can upgrade with:

假设您需要转到1.0.0或更高版本,您可以升级:

sudo gem install cocoapods

The second warning indicates an issue with the quotes in your Podfile. You can open it in XCode, or via a command line tool line Nano and verify that all the quotes are standard quotes like this ' or ".

第二个警告表示Podfile中的引号存在问题。您可以在XCode中打开它,或者通过命令行工具线Nano打开它,并验证所有引号都是标准引号,如“或”。

Odds are, your quotes will have slants to them like this ( ), which is the source of the warning.

可能的情况是,你的报价会像这样倾斜(“),这是警告的来源。

#2


0  

What you did wrong is clearly stated in the error message:

您错误的内容在错误消息中明确说明:

Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.

你的Podfile已经清理了智能报价。为避免将来出现问题,您不应使用TextEdit进行编辑。如果您不使用TextEdit,则应在所选编辑器中关闭智能引号。

You must have been using this type of quotes:

你一定是在使用这种类型的报价:

“”

You should be using these instead:

你应该使用这些:

""

By default, TextEdit will use the former so you should use Xcode to edit your Podfile instead.

默认情况下,TextEdit将使用前者,因此您应该使用Xcode来编辑Podfile。

#1


2  

The first error is complaining about the version of CocoaPods you have installed. You can verify your version with the following command:

第一个错误是抱怨你安装的CocoaPods的版本。您可以使用以下命令验证您的版本:

pod --version

Assuming you need to go to 1.0.0 or above, you can upgrade with:

假设您需要转到1.0.0或更高版本,您可以升级:

sudo gem install cocoapods

The second warning indicates an issue with the quotes in your Podfile. You can open it in XCode, or via a command line tool line Nano and verify that all the quotes are standard quotes like this ' or ".

第二个警告表示Podfile中的引号存在问题。您可以在XCode中打开它,或者通过命令行工具线Nano打开它,并验证所有引号都是标准引号,如“或”。

Odds are, your quotes will have slants to them like this ( ), which is the source of the warning.

可能的情况是,你的报价会像这样倾斜(“),这是警告的来源。

#2


0  

What you did wrong is clearly stated in the error message:

您错误的内容在错误消息中明确说明:

Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.

你的Podfile已经清理了智能报价。为避免将来出现问题,您不应使用TextEdit进行编辑。如果您不使用TextEdit,则应在所选编辑器中关闭智能引号。

You must have been using this type of quotes:

你一定是在使用这种类型的报价:

“”

You should be using these instead:

你应该使用这些:

""

By default, TextEdit will use the former so you should use Xcode to edit your Podfile instead.

默认情况下,TextEdit将使用前者,因此您应该使用Xcode来编辑Podfile。