Cocoapods error reading ~/.cocoapods/repos/master/CocoaPods-version.yml after reinstall

error installing cocoapods failed to build gem native extension
install cocoapods
error installing cocoapods: error: failed to build gem native extension.
update cocoapods
pod install not working
error running pod install flutter
pod install not working react-native
error while installing cocoapods

I performed my normal pod update and received the following message:

[!] There was an error reading '~/.cocoapods/repos/master/CocoaPods-version.yml'.
Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.

So I followed the instructions in http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/

$ sudo rm -fr ~/.cocoapods/repos/master
$ pod setup
Setting up CocoaPods master repo
[!] There was an error reading '~/.cocoapods/repos/master/CocoaPods-version.yml'.
Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.

Same error. So I removed cocapods, upgraded ruby and gems, installed cocoapods:

$ sudo rm -fr ~/.cocoapods

$ sudo gem uninstall cocoapods
Remove executables:
    pod, sandbox-pod

in addition to the gem? [Yn]  y
Removing pod
Removing sandbox-pod
Successfully uninstalled cocoapods-0.35.0

$ sudo gem update --system
Latest version currently installed. Aborting.

$ sudo gem update
Updating installed gems
Updating activesupport
Fetching: i18n-0.7.0.gem (100%)
.
.
.

$ sudo gem install cocoapods
Fetching: cocoapods-0.35.0.gem (100%)
Successfully installed cocoapods-0.35.0
Parsing documentation for cocoapods-0.35.0
Installing ri documentation for cocoapods-0.35.0
Done installing documentation for cocoapods after 4 seconds
1 gem installed

$ pod setup
Setting up CocoaPods master repo
[!] There was an error reading '~/.cocoapods/repos/master/CocoaPods-version.yml'.
Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.

Just for fun, I also ran pod install.

Same error. Anyone else run into this problem? Solve it? Or see what I am doing wrong? This iOs app has been using pods for a while now. I just added pod 'ZSSRichTextEditor', '~> 0.5' to the Podfile as my most recent change.

Update:

Here is the CocoaPods-version.yml file:

---
min: 0.32.1
last: 0.35.0

Ok, found the same problem thread on github. Answered by csknns.

Here is how it went for me, re-install psych:

$ sudo gem uninstall psych
Password:

Select gem to uninstall:
 1. psych-2.0.5
 2. psych-2.0.6
 3. psych-2.0.8
 4. All versions
> 4
Successfully uninstalled psych-2.0.5
Successfully uninstalled psych-2.0.6
Successfully uninstalled psych-2.0.8

$ sudo gem install psych -v 2.0.0
Fetching: psych-2.0.0.gem (100%)
Building native extensions.  This could take a while...
Successfully installed psych-2.0.0
Parsing documentation for psych-2.0.0
Installing ri documentation for psych-2.0.0
Done installing documentation for psych after 2 seconds
1 gem installed

$ pod setup
Setting up CocoaPods master repo
Already up-to-date.
Setup completed

Hope this helps someone out there!

Pod setup error. � Issue #2908 � CocoaPods/CocoaPods � GitHub, Cocoapods error reading ~/.cocoapods/repos/master/CocoaPods-version.yml after All versions > 4 Successfully uninstalled psych-2.0.5 Successfully uninstalled Installing ri documentation for psych-2.0.0 Done installing documentation for psych after 2 seconds 1 gem installed $ pod setup Setting up CocoaPods master� …ommunity#513) * fix: run `pod repo update` after installing CocoaPods (react-native-community#487) Added `pod repo update` command call after CocoaPods installation to avoid issues with pod command being unable to find specification for dependency. Added loader to CocoaPods installation step for consistency with other steps of init and

This bug seems to be fixed in newer versions of RubyGems. Updating with gem update --system allows me to update to the latest version of psych without breaking CocoaPods.

Credit: https://github.com/CocoaPods/CocoaPods/issues/3539#issuecomment-125106504

Cocoapods error reading ~/.cocoapods/repos/master - iOS, In my case, I solved the problem by reinstalling Ruby. sudo rm -fr ~/.cocoapods/ repos/master/CocoaPods-version.yml After reading about comments, I performed gem uninstall psych which left me with gem list of psych� See #2908 and #3490. We should investigate why it's broken in Psych and potentially fix the problem. If that's not easily achievable we should perhaps pin to Psych 2.0.0 in our gem spec.

What finally worked for me was the solution posted here on the cocoapods github

rm -rf ~/Library/Caches/CocoaPods ~/.cocoapods; gem update --system; gem update; gem cleanup; pod setup

Troubleshooting, Cocoapods error reading ~/.cocoapods/repos/master/CocoaPods-version.yml after reinstall - I am getting following error while installing Cocoa Pods. I am trying to install a Cocoapods fresh on my OSX Yosemite machine. I'm using Ruby 2.1.5 and zsh. Here are my order of steps: Make sure there's no residual Cocoapods config on my machine with rm -rf ~/.cocoapods Uninstall all Cocoapods-

Common Build Problems - Travis CI, After upgrading from macOS 10.8 to 10.9 the installed CocoaPods gem doesn't work To solve this, you might need to uninstall the gem first and then re-install. If you used an pre release version of Xcode you might need to update the sudo rm -fr ~/Library/Caches/CocoaPods/ $ sudo rm -fr ~/.cocoapods/repos/ master/. $ sudo gem install cocoapods Fetching: cocoapods-0.35.0.gem (100%) Successfully installed cocoapods-0.35.0 Parsing documentation for cocoapods-0.35.0 Installing ri documentation for cocoapods-0.35.0 Done installing documentation for cocoapods after 4 seconds 1 gem installed $ pod setup Setting up CocoaPods master repo [!]

再インストール後に〜/ .cocoapods/repos/master/CocoaPods-version , Sometimes, you'll see a build script causing an error and the message in the log it is possible some builds using private dependencies between repos can break. clearing the cache or; removing the cache key from your .travis.yml (you can add it To work around this issue, you can either install CocoaPods manually as� <Installing CocoaPods. If you are installing on macOS 10.9.0-10.9.2, you may run into an issue when RubyGems tries to install the json gem. To fix this follow these instructions. After upgrading from macOS 10.8 to 10.9 the installed CocoaPods gem doesn’t work anymore, even after re-installing the gem.

dnkoutso ( D. Koutsogiorgas ), Cocoapods error reading ~/.cocoapods/repos/master/CocoaPods-version.yml after reinstall. 出典: link タグ:cocoapods 更新時間: 2020-04-30� If you originally installed the cocoapods gem using sudo, you should use that command again. Later on, when you're actively using CocoaPods by installing pods, you will be notified when new versions become available with a CocoaPods X.X.X is now available, please update message. Using a CocoaPods Fork

Comments
  • After 3 hours trying to fix the error, this finally worked. Thank you @Kent
  • I just updated via gem update. Update picked up psych-2.0.12. This version does allow pod update to complete.
  • @kent I did the same thing, thank you for finding this fix :)
  • Thanks, I got same problem, after I uninstall psych-2.0.15 and reinstall psych-2.0.0, then pod setup works.
  • Was trying the answers similar to Kent's. But this one worked for me. Thanks Tag.