ios - Pod 安装命令出错

标签 ios xcode cocoapods

我一直在尝试使用 cocoapods 并将它们安装到我的项目中,但在尝试将其安装到项目位置时出现此错误。有点困惑?

/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 中用这个“'”替换这个字符“'”并尝试重新安装。

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

pod 'AFNetworking', '~> 2.0'

但是当我从其他编辑那里获取时,它可能是这样的:

pod ‘AFNetworking‘, ‘~> 2.0‘

关于ios - Pod 安装命令出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30934134/

相关文章:

swift - 重叠的 Pod 依赖关系

ios - 如何使用 Seque 在 tableView 中找到点击按钮的 indexPath

ios - 信任 iOS 13 上基于 TLS 的 WebSocket 的自签名证书

ios - 将数据传递给另一个 View Controller

ios - 是否可以以编程方式设置 ViewController Storyboard ID?

ios - 如何摆脱 "CocoaPods could not find compatible versions for pod"?我尝试更新 cocoapod 和 pod repo

ios - 为什么不推荐使用 MonoTouch 进​​行 iPhone 开发?

ios - 如何在 iOS 中实现日期范围的选择?

ios - 解析推送通知框架中的 Apple Mach-O 链接器错误

CocoaPods 设置需要永远