sudo gem install cocoapods
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory.
sudo gem install cocoapods
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory.
Me also facing this same issue, but not yet got any solution.
this works for me:
Step 1 (install HomeBrew)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)
Step 2 (Run these two commands in your terminal to add Homebrew to your PATH)
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/”YOUR USER FORLDER”/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
Step 3 (now you can install cocoapods)
brew install cocoapods
same problem stuck since hours. Nothing Seems to work. @gormarroquin permission denied while executing your commands as well for brew
Same problem guys, did anyone found any solution to it ?
Hi Guys, My solution (on Big Sur 11.6.2):
Step 1:
Install brew
1. curl -fsSL -o install.sh https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
2. /bin/bash install.sh
Step 2:
brew install chruby ruby-install
Step 3:
brew install cocoapods
Step 4: (Check your cocoapods version):
brew upgrade cocoapods
Need Xcode Command Line Tools, if not installed then run this command:
sudo xcode-select --install
It's works for me
I was getting this exact error mentioned.
In my case, the MacOs update for BigSur + Monterey update, solved the problem like a charm.
After Monterey got installed I could pod install
normally with no more errors.
What I did was run the following and it seemed to work
gem install cocoapods --user-install
I guess from there you need to update your path to point to the user directory.
Your solution was life-changing. I can save my tears for another bug! Thank you stranger, I hope you are well-blessed :)