Pod安装错误的命令
我一直在尝试使用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中的这个“'”replace这个字符“'”并尝试再次安装。
当我从其他地方(如Evernote)复制pod行时,发生在我身上的一些文本编辑器会自动更改此字符。 通常是这样的:
pod 'AFNetworking', '~> 2.0'
但是当我从其他编辑拿走时,可能是这样的:
pod 'AFNetworking', '~> 2.0'
按照下面的步骤:
1.打开terminal。
2.pod安装//下载podfiles需要一些时间
3.pod列表//(可选)查看pod列表
4.cd桌面//(您的项目path)
5.cd CoacPods(您的项目名称)
6.vim podfile
7.pod安装
在shell提示符下检查chmod go-w / opt / local / bin (取决于你可能需要sudo来执行的权限)。