0

I can't use sudo gem install cocoapods and it has no response. I have even removed all cocoapods and try again. it is not okay.

Some link in stackoverflow say I need to do like this. It is still not okay.

sudo chown -R $(whoami) /usr/local

How shall I do?

Khant Thu Linn
  • 5,905
  • 7
  • 52
  • 120

1 Answers1

0

Try to do this:

export GEM_HOME=~/.gems
export PATH=$GEM_HOME/bin:$PATH

gem install cocoapods
Iulian Onofrei
  • 9,188
  • 10
  • 67
  • 113
Jeluomsy
  • 1
  • 2
  • providing an answer, try to give more details about what is the solution and why would it work :) – mikus Dec 11 '15 at 09:42
  • Maybe you are running OS X 10.11. This is happening because Apple has enabled rootless on the new install. You can look up [this](http://stackoverflow.com/questions/30812777/cannot-install-cocoa-pods-after-uninstalling-results-in-error/30851030#30851030). – Jeluomsy Dec 11 '15 at 09:48