ios - 错误:执行 gem ... (Errno::EPERM) 操作不允许 -/usr/bin/pod in Xcode 8 swift 3

标签 ios iphone cocoapods xcode8

我正在研究 cocoa pod 。在安装 cocoaPods 时,我遇到了类似

的问题
ERROR:  While executing gem ... (Errno::EPERM)
    Operation not permitted - /usr/bin/pod

我尝试了很多以前提到过的命令。我尝试更新并尝试安装 ruby​​,尽管它出现错误。

谁能帮我解决这个问题。我犯了什么错误。

错误是这样来的

CG-iMac-Dev:siriSample imfuser$ pod install

Analyzing dependencies

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

### Command

```
/usr/local/bin/pod install
```

### Report

* What did you do?

* What did you expect to happen?

* What happened instead?


### Stack

```
   CocoaPods : 1.2.0.beta.3
        Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
    RubyGems : 2.6.8
        Host : Mac OS X 10.12 (16A323)
       Xcode : 8.1 (8B62)
         Git : git version 2.9.3 (Apple Git-75)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ a45ce117b1ea0dce36ed2a3e4d7d0b7f9db588a8
```

### Plugins

```
cocoapods-deintegrate : 1.0.1
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.1.2
cocoapods-try         : 1.1.0
```

### Podfile

```ruby
platform :ios, '8.0'
 use_frameworks! 
target 'siriSample' do 

pod 'Alamofire', '~> 2.0.2' 

end
```

### Error

```
LoadError - cannot load such file -- nanaimo
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj/plist.rb:23:in `read_from_path'
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj/project.rb:200:in `initialize_from_file'
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj/project.rb:102:in `open'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.3/lib/cocoapods/installer/analyzer.rb:851:in `block (2 levels) in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.3/lib/cocoapods/installer/analyzer.rb:850:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.3/lib/cocoapods/installer/analyzer.rb:850:in `block in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.3/lib/cocoapods/installer/analyzer.rb:845:in `inspect_targets_to_integrate'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.3/lib/cocoapods/installer/analyzer.rb:66:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.3/lib/cocoapods/installer.rb:236:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.3/lib/cocoapods/installer.rb:150:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.3/lib/cocoapods/installer.rb:149:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.3/lib/cocoapods/installer.rb:110:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.3/lib/cocoapods/command/install.rb:37:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'
```

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=cannot+load+such+file+--+nanaimo&type=Issues

If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...
 - LoadError - cannot load such file -- nanaimo
   https://github.com/CocoaPods/CocoaPods/issues/6214 [open] [19 comments]
   14 hours ago

 - help!   cannot load such file -- nanaimo
   https://github.com/CocoaPods/CocoaPods/issues/6312 [closed] [5 comments]
   13 minutes ago

 - LoadError - cannot load such file -- nanaimo
   https://github.com/CocoaPods/CocoaPods/issues/6281 [closed] [2 comments]
   3 weeks ago

最佳答案

这是您系统中的一项安全功能。

尝试不同的路径。

这帮我解决了这个问题。 (在你的终端)

sudo gem install -n /usr/local/bin cocoapods --pre

关于ios - 错误:执行 gem ... (Errno::EPERM) 操作不允许 -/usr/bin/pod in Xcode 8 swift 3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41361053/

相关文章:

c++ - Xcode 6 : Set Preprocessor Macros per architecture

iphone - 在包含错误的 UITextfield 周围制作一个红色边框

ios - 如何在本地为 Objective-C 语言运行 travis-ci

ios - 分配给可选时意外发现 nil

ios - `pod update` 命令未更新已安装的 Pod

ios - 如何显示一个屏幕 3 秒,然后切换到下一个屏幕?

iphone - 是否可以为 Windows Phone 7.5 或 iOS 创建后台服务?

iphone -/n 在来自 XML 解析的数组中

xcode - 从 Xcode 9 构建中缺少所需的图标文件

swift - 如何在没有 Xcode 的情况下链接 CocoaPods 库(integrate_targets false)