Error running pod install for an update due to permissions

2.6k Views Asked by At

I am getting an error when running pod install on my project. The error is seen as a permission error:

Errno::EACCES - Permission denied - 
/Users/**/.rbenv/versions/1.9.3-p327/lib/ruby/1.9.1/fileutils.rb:1406:in `unlink'
/Users/**/.rbenv/versions/1.9.3-p327/lib/ruby/1.9.1/fileutils.rb:1406:in `block in remove_file'

RBENV version
rbenv 0.4.0-49-g8b04303

Ruby version
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin12.4.0]

Running sudo pod install would work fine. What should I do to correct the permission error so that pod install can be run as normal?

2

There are 2 best solutions below

2
On BEST ANSWER

Try

sudo chown -R `whoami` path/to/project/

if that doesn't help, you can also try

sudo chown -R `whoami` ~/.cocoapods
sudo chown -R `whoami` ~/Library/Caches/CocoaPods
0
On

Unfortunately these steps didn't work for me and I resolve with:

sudo rm -fr ~/Library/Caches/CocoaPods/*