0

when I tried to integrate flurry analysis into my ios app, I followed the instruction online. However, after I did the step shown below, I faced an error shown below. I've searched solution online but there is no one that exactly solves my puzzle. Could anyone help me solve this problem? Appreciate it!


sudo gem install cocoapods Password: ERROR: While executing gem ... (Gem::FilePermissionError)

You don't have write permissions for the /usr/bin directory.

Hanqing Zhao
  • 25
  • 2
  • 7

1 Answers1

0

You need root privilege to write into /usr/bin

sh-4.2$ ls -ld /usr/bin
dr-xr-xr-x 3 root root 36864 Mar 20 18:40 /usr/bin
ramarov
  • 1
  • 2
  • 1
    On recent versions of macOS, the /usr/bin directory is protected even from root by [System Integrity Protection](https://apple.stackexchange.com/questions/193368/what-is-the-rootless-feature-in-el-capitan-really). Local installs really belong in /usr/local (in this case, /usr/local/bin) anyway; macOS just enforces this now. – Gordon Davisson Apr 09 '18 at 21:23