Reputation: 3680
I'm new to CocoaPods, I tried running 'pod install'
on my Mac to install my pod, but I'm getting a permissions error with the folder /Users/username/Library/Caches/CocoaPods
. That folder doesn't even exist! Did I accidentally delete it at one point? How do I restore it?
There is however a folder called /Library/Caches
but its not under my username, its at the root.
I'm a little confused. If someone can just direct me in the right direction, I would really appreciate it.
Here is the full error message:
Errno::EACCES - Permission denied @ dir_s_mkdir - /Users/nachshonfertel/Library/Caches/CocoaPods
Upvotes: 5
Views: 7709
Reputation: 854
Set the correct permissions for the folder: as in the picture. (Sorry for the localization)
Upvotes: 0
Reputation: 2339
I managed to solve my issue in following steps:
Create CocoaPods folder (if it doesn't exist) cd ~/Library/Caches && mkdir CocoaPods
Give access to CocoaPods folder sudo chmod 777 Cocoapods
cd CocoaPods && mkdir Pods
sudo chmod 777 Pods
I hope it helps !
Upvotes: -1
Reputation: 1411
You can solve this in 2 ways.
pod install
OR
- cd your-project
- chmod -R 777 .
- cd ios
- pod install
Upvotes: 7
Reputation: 13
I solved the problem creating the missing folder Users (in my case the error was Permission denied @ dir_s_mkdir - /Users/Users) and give full permission to all users.
Upvotes: 0
Reputation: 12514
I had been struggling with this issue for a while. For some reason, in my case the problem was that the folder ~/Library/Caches/CocoaPods was not there, and cocoapods wasn't able to create it when running 'pod install'. Hence the permission error.
After trying several things, I created that folder manually (which prompted for my password), ran 'pod update' and my problem was fixed!
Hope this saves someone some trouble.
Upvotes: 0
Reputation: 3680
Turns out it was a permissions error. And the folder I thought didn't exist, was hidden in finder > Go > (Hold Down Option Key) Library
Took me 2 full days to finally figure it out!
Upvotes: 1
Reputation: 742
Are you using system Ruby or have you installed Ruby with sudo
?
You basically have 2 options:
use sudo pod install
Install Ruby, non-sudo; you can try
Upvotes: -1