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
Closed

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

bryan1anderson opened this issue Jun 16, 2015 · 7 comments
Labels
s1:awaiting input Waiting for input from the original author

Comments

@bryan1anderson
Copy link

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
Copy link

lfarah commented Jun 17, 2015

Getting the same thing...

@neonichu
Copy link
Member

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

@neonichu neonichu added the s1:awaiting input Waiting for input from the original author label Jun 17, 2015
@lfarah
Copy link

lfarah commented Jun 17, 2015

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

@segiddins
Copy link
Member

the issue here is rootless and the default gem home conflicting

@abelsu
Copy link

abelsu commented Jun 20, 2015

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

@bspringston
Copy link

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
Copy link
Member

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
s1:awaiting input Waiting for input from the original author
Projects
None yet
Development

No branches or pull requests

6 participants