0

When I trying to install the cocoapods rubygem (sudo gem install cocoapods),I got this error.

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

I tried specifying a new bin directory through sudo gem install -n /usr/local/bin cocoapods but that didn't solve my problem.

Leo
  • 24,596
  • 11
  • 71
  • 92
Charles
  • 13
  • 2
  • Can you post the value of your PATH variable please? – Sven Driemecker Mar 21 '17 at 22:29
  • I don't know how to post the value of my PATH variable ,please tell me . – Charles Mar 22 '17 at 04:05
  • You have successfully installed cocoapods,your $PATH is not right. Try refer to this answer to setup $PATH http://stackoverflow.com/a/32989451/3940672 – Leo Mar 22 '17 at 05:48
  • echo $PATH is what you need to execute to print it's contents – Sven Driemecker Mar 22 '17 at 09:03
  • Awesome ! thank you very much! Rearranging the default path.move into the home directory 'nano .bash_profile ' Create the .bash_profile file with a command line editor called nano 'export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" ' Save the file in nano by clicking ‘control’ +’o’ and confirming the name of the file is .bash_profile by hitting return. And the ‘control’+’x’ to exit nano So now when the Terminal is relaunched or a new window made and you check the the path by 'echo $PATH' You will get a new path . Then run 'pod setup' – Charles Mar 23 '17 at 03:17

0 Answers0