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

Community
  • 1
  • 1
MobileDev
  • 3,750
  • 4
  • 32
  • 35

6 Answers6

247

Solution, fix for Cocoapods error on El Capitan 10.11:

sudo gem install -n /usr/local/bin cocoapods
huynguyen
  • 7,616
  • 5
  • 35
  • 48
  • It would be great if somewhere someone explained why when we updated to EL Capitan that the pod framework was either deleted or not moved to the proper place in the system. Anyone has a link to that> – Esko918 Nov 06 '15 at 17:17
  • Great! Working fine on my OS EL capitan. – prakash singh Jan 07 '16 at 04:46
  • I am getting this warning when i enter that command ..WARNING: Improper use of the sudo command could lead to data loss or the deletion of important system files. Please double-check your typing when using sudo. Type "man sudo" for more information. – Uma Madhavi Jan 08 '16 at 09:10
14

Installing CocoaPods on OS X 10.11

These instructions were tested on all betas and the final release of El Capitan.

Custom GEM_HOME

This is the solution when you are receiving the "Operation not permitted" error.

$ 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
Babul Prabhakar
  • 2,373
  • 1
  • 18
  • 25
5

I had to update the system before 'gem install' otherwise I got this:

ERROR: Error installing cocoapods: activesupport requires Ruby version >= 2.2.2.:

Here's what worked for me:

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

I actually needed to just update:

pod update
James Y
  • 113
  • 1
  • 5
  • 1
    This worked for me, but I had to blow away `/Library/Ruby` first to clear out some permission issues. – Dave Wood May 09 '16 at 08:38
3

You previously opened Xcode under root access.

Just delete /Pods/Pods.xcodeproj/xcuserdata/root.xcuserdatad folder and continue pod install

icompot
  • 375
  • 3
  • 5
  • This answer is the correct one. This issue is saying root.xcuserdatad file doesn't have permission, not the pod floder, they are not the same issue. `sudo gem install -n /usr/local/bin cocoapods` will not work for this problem. – Marco Lee Nov 05 '15 at 02:42
0

I am using rvm and I install using the following command:

gem install cocoapods -n /usr/local/bin

then pod install

Rubyrider
  • 3,567
  • 1
  • 28
  • 34
0

I found -bash: pod: command not found Just do it in terminal

sudo gem install cocoapods