66

I ran pod install with El Capitan and got this error:

Errno::EPERM - Operation not permitted - /Users/../Pods/Pods.xcodeproj/xcuserdata/root.xcuserdatad

Here's my environment: El Capitan (15A279b), Xcode Version 7.0 (7A220), cocoapod 0.38.2. Any ideas? Thanks!!!

The reason I use xcode7 (and not 6.4) is that I need to target an existing project to iOS9 for testing. And the reason I am using El Capitan is that xcode7 doesn't run under Yosemite. And I need to replace a library (managed by cocoapod) that no longer works under iOS9.

Here's how I install cocoapods in El Capitan sudo gem install -n /usr/local/bin cocoapods as suggested by this link Cannot install cocoa pods after uninstalling, results in error

pod --version

returns

0.38.2

4

6 回答 6

247

解决方案,修复 El Capitan 10.11 上的 Cocoapods 错误:

sudo gem install -n /usr/local/bin cocoapods
于 2015-10-02T03:51:50.837 回答
14

在 OS X 10.11 上安装 CocoaPods

这些说明已在所有 beta 版和 El Capitan 的最终版本上进行了测试。

自定义 GEM_HOME

这是您收到“不允许操作”错误时的解决方案。

$ mkdir -p $HOME/Software/ruby
$ export GEM_HOME=$HOME/Software/ruby
$ gem install cocoapods
[...]
1 gem installed
$ export PATH=$PATH:$HOME/Software/ruby/bin
$ pod --version
0.38.2
于 2015-10-07T07:21:25.110 回答
5

我必须在“gem install”之前更新系统,否则我得到这个:

错误:安装 cocoapods 时出错:activesupport 需要 Ruby 版本 >= 2.2.2。:

这对我有用:

gem update --system
sudo gem install -V -n /usr/local/bin cocoapods
pod install

我实际上只需要更新:

pod update
于 2016-03-29T19:10:25.240 回答
3

您之前在 root 访问权限下打开了 Xcode。

只需删除/Pods/Pods.xcodeproj/xcuserdata/root.xcuserdatad文件夹并继续pod install

于 2015-10-05T10:43:14.587 回答
0

我正在使用 rvm 并使用以下命令进行安装:

gem install cocoapods -n /usr/local/bin

然后pod install

于 2016-11-15T06:07:30.170 回答
0

我发现 -bash: pod: command not found 就在终端做

sudo gem install cocoapods
于 2019-03-04T13:23:21.063 回答