Can not perform `pod install` under el capitan (15A279b)

CocoapodsRootXcode7Osx Elcapitan

Cocoapods Problem Overview


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 https://stackoverflow.com/questions/30812777/cannot-install-cocoa-pods-after-uninstalling-results-in-error/30851030#30851030

pod --version

returns

0.38.2

Cocoapods Solutions


Solution 1 - Cocoapods

Solution, fix for Cocoapods error on El Capitan 10.11:

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

Solution 2 - Cocoapods

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

Solution 3 - Cocoapods

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

Solution 4 - Cocoapods

You previously opened Xcode under root access.

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

Solution 5 - Cocoapods

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

gem install cocoapods -n /usr/local/bin

then pod install

Solution 6 - Cocoapods

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

sudo gem install cocoapods

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMobileDevView Question on Stackoverflow
Solution 1 - CocoapodshuyncView Answer on Stackoverflow
Solution 2 - CocoapodsBabul PrabhakarView Answer on Stackoverflow
Solution 3 - CocoapodsJames YView Answer on Stackoverflow
Solution 4 - CocoapodsicompotView Answer on Stackoverflow
Solution 5 - CocoapodsRubyriderView Answer on Stackoverflow
Solution 6 - CocoapodsAsfar Hussain SiddiquiView Answer on Stackoverflow