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

cococpods在使用的时候经常会出现各种各样的问题,让人头疼

有一次我再在cocoapods 执行   sudo gem install cocoapods

的时候出现

  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /usr/bin directory.

后来查阅资料后发觉将  sudo gem install cocoapods

改为 sudo gem install -n /usr/local/bin cocoapods 
 

你可能感兴趣的:(iOS,前端开发,技术,编程语言,技术分享)