Pod安装命令有错误 [英] Pod install command with error

查看:179
本文介绍了Pod安装命令有错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用 cocoapods 并将它们安装到我的项目中,但是在尝试将其安装到项目位置时它给了我这个错误。它有点令人困惑?

I've been trying to use cocoapods and install them into my project but its giving me this error while trying to install it in the project location. its kinda confusing ?

/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/command.rb:127: warning: Insecure world writable dir /usr/local in PATH, mode 040777
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.37.2/lib/cocoapods-core/standard_error.rb:88:in `message': incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError)
    from /Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:367:in `handle_exception'
    from /Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:315:in `rescue in run'
    from /Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:303:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/command.rb:46:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/bin/pod:44:in `<top (required)>'
    from /usr/bin/pod:23:in `load'
    from /usr/bin/pod:23:in `<main>'


推荐答案

在您的podfile中用此'替换此字符'并尝试再次安装。

replace this character " ‘ " with this " ' " in your podfile and try to install again.

当我从其他地方(如Evernote)复制pod行时,我发生了这种情况,一些文本编辑器会自动更改此字符。通常是这样的:

it's happen to me when I copy pod line from somewhere else (like Evernote), some text editors automatically change this character. Usually it's like this :

pod 'AFNetworking', '~> 2.0'

但是当我从其他编辑处拿走时,它可能是这样的:

but when I take from other editor, it could be like this :

pod ‘AFNetworking‘, ‘~> 2.0‘

这篇关于Pod安装命令有错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆