Can't run sudo pod install after updating to cocoapods 0.32.1 with error “You cannot run CocoaPods as root. (CLAide::Help)”

可紊 提交于 2019-11-28 08:39:05
Marc

I had to update permission on CocoaPods

sudo chown -R $USER ~/Library/Caches/CocoaPods

sudo chown -R $USER ~/.cocoapods

Since it seems to fix the problem for some people, you might want to try running "pod install" and see if it fixed your problem from that point. However, I still had a permission denied when running "pod install" for a pod item, so running the next line will overwrite permission for the pod folder.

sudo chown -R $USER ./Pods

I have removed the old podfile.lock before running pod install

Source :

cocoaPods pod install Permission denied

https://github.com/CocoaPods/CocoaPods/issues/509

I am working with windows. After reading all tips which didn't work I drove into the code base. As a disclaimer, I am beginning phase of developing an app and my goal is to get a quick proof of concept. Therefore, this solution will only bypass that the error message as a quick hack.

In the file ~/lib/cocoapods/command.rb you will find a function on line 47 that stops the program if there is a root user.

#help! 'You cannot run CocoaPods as root.' if Process.uid == 0

Simply comment out the line. Again, this is a terrible idea to do in any situation except as a pragmatist using Windows and trying to get proof of concept out.

in my case, the both "folder content project" and file "project.xcodeproj" was locked "i ignore why !!! maybe the git clone provoked error :s", i unlock the folder and apply all changes for sub folder .... And it WORK FINE :D

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!