Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operation not permitted - /usr/bin/xcodeproj #3692

Closed
bryan1anderson opened this issue Jun 16, 2015 · 7 comments

Comments

@bryan1anderson
Copy link

commented Jun 16, 2015

I get this error every time I try and run

sudo gem install cocoapods

ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/xcodeproj

@lfarah

This comment has been minimized.

Copy link

commented Jun 17, 2015

Getting the same thing...

@neonichu

This comment has been minimized.

Copy link
Member

commented Jun 17, 2015

Obviously, we need a bit more information, e.g. what OS version you are running on.

@lfarah

This comment has been minimized.

Copy link

commented Jun 17, 2015

I'm running El Capitan. Was forced to downgrade and now it works

@segiddins

This comment has been minimized.

Copy link
Member

commented Jun 17, 2015

the issue here is rootless and the default gem home conflicting

@abelsu

This comment has been minimized.

Copy link

commented Jun 20, 2015

How to slove it ? I get the same thing:-(

@bspringston

This comment has been minimized.

Copy link

commented Jun 21, 2015

Also on OS X El Capitan and getting the same error. Any known resolution without downgrading?

@CocoaPods CocoaPods locked and limited conversation to collaborators Jun 21, 2015

@neonichu

This comment has been minimized.

Copy link
Member

commented Jun 21, 2015

Installing CocoaPods on OS X 10.11 and macOS 10.12

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

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.37.2

Standard system installation

For whatever reason, the rootless stuff seems less restrictive when one simply upgrades the system. I could sudo gem install cocoapods just fine on a machine upgraded from 10.10 - however, binstubs are no longer installed into /usr/bin:

$ sudo gem install cocoapods
[...]
1 gem installed
$ export PATH=$PATH:/Library/Ruby/bin
$ pod --version
0.37.2

We have heard from some users that they receive this error when doing a system-wide installation:

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

This happens when you have updated the rubygems gem of your system ruby installation, but this can be solved by passing -n /usr/local/bin to the install command, so that the pod executable gets installed there. The issue here is that the default gem that ships with the system has a customised binary directory, but any newer version you install (e.g. via gem update --system) does not.

Note: I've locked the issue to collaborators so that these instructions don't get buried for now.

@neonichu neonichu closed this Jun 21, 2015

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
6 participants
You can’t perform that action at this time.