# CocoaPods is installed but broken

**URL:** <https://discuss.circleci.com/t/cocoapods-is-installed-but-broken/49496>\
**Category:** Mobile\
**Created:** [October 9, 2023, 6:44pm UTC](https://discuss.circleci.com/t/cocoapods-is-installed-but-broken/49496 "2023-10-09T18:44:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pradeep-samji](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/pradeep-samji/32/33919_2.png) [@pradeep-samji](https://discuss.circleci.com/u/pradeep-samji)\
**Post date:** [October 9, 2023, 6:44pm UTC](https://discuss.circleci.com/t/cocoapods-is-installed-but-broken/49496/1 "2023-10-09T18:44:54Z")

</div>

Building flutter app for iOS fails with the error “CocoaPods is installed but broken. Skipping pod install.” The build was working fine till a few days ago and started failing without any changes being made to the build configuration. I added steps to update cocoapods but it did not help.

---

<div class="post-metadata">

**Author:** ![rit1010](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/rit1010/32/34738_2.png) [@rit1010](https://discuss.circleci.com/u/rit1010)\
**Post date:** [October 9, 2023, 6:47pm UTC](https://discuss.circleci.com/t/cocoapods-is-installed-but-broken/49496/2 "2023-10-09T18:47:52Z")

</div>

[Are you using shell or bash as this pass report indicates that shell (sh) could cause issues

> [@CocoaPods is installed but broken. Skipping pod install](https://discuss.circleci.com/t/cocoapods-is-installed-but-broken-skipping-pod-install/45929):
>
> Hello, Building a Flutter app for iOS it always fails with an error called “CocoaPods is installed but broken. Skipping pod install” Warning: CocoaPods is installed but broken. Skipping pod install. [15:23:37]: ▸ You appear to have CocoaPods installed but it is not working. [15:23:37]: ▸ This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it. [15:23:37]: ▸ This can usually be fixed by re-installing CocoaPods. I tried to reins…

---

<div class="post-metadata">

**Author:** ![pradeep-samji](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/pradeep-samji/32/33919_2.png) [@pradeep-samji](https://discuss.circleci.com/u/pradeep-samji)\
**Post date:** [October 9, 2023, 7:02pm UTC](https://discuss.circleci.com/t/cocoapods-is-installed-but-broken/49496/3 "2023-10-09T19:02:44Z")

</div>

I did not find a way to specify if it should use shell or bash. I guess the build uses whatever is default. Is there a way to specify that it should use bash for running commands?

---

<div class="post-metadata">

**Author:** ![rit1010](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/rit1010/32/34738_2.png) [@rit1010](https://discuss.circleci.com/u/rit1010)\
**Post date:** [October 9, 2023, 8:01pm UTC](https://discuss.circleci.com/t/cocoapods-is-installed-but-broken/49496/4 "2023-10-09T20:01:21Z")

</div>

If you not switching shells in your config.yml then the default should be bash, which in turn means that the post I referenced is not relevant.

As for changing shells and the default setting you can find the details here

> **[Configuration reference - CircleCI](https://circleci.com/docs/configuration-reference/#default-shell-options)**
>
> Reference for .circleci/config.yml

As for the issue, I’m not sure I can be much help. The following report over at the CocoaPods github may provide some leads to follow.

> <https://github.com/CocoaPods/CocoaPods/issues/8661>
>
> \<!--
> ℹ Please fill out this template when filing an issue.
> All lines beginning… with an ℹ symbol instruct you with
> what info we expect.  
> 
> Before you start, are you using the latest CocoaPods release?
> A lot changes with Xcode releases that are not backwards compatible.
> 
> Not an issue about the CocoaPods command line app? Please file an issue in the appropriate repo - https://github.com/CocoaPods
> Issues are for feature requests, and bugs; questions should go to Stack Overflow
> 
> Using CocoaPods \<= 0.39: https://blog.cocoapods.org/Sharding/
> 
> Using Xcode 8: Requires CocoaPods 1.1.0 or above.
> 
> Issue with Nanaimo not loading:
> Please run \`\[sudo\] gem uninstall nanaimo\` and remove all but the latest version.
> 
> Issues with \`pod search\`? Try deleting your cache \`rm -rf ~/Library/Caches/CocoaPods\`first.
> \--\>
> 
> \* I've read and understood the \[\*CONTRIBUTING\* guidelines and have done my best effort to follow\](https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md).
> 
> \# Report
> 
> \## What did you do?
> 
> Run \`pod\`.
> 
> \## What did you expect to happen?
> 
> Um... not error out, I guess :D
> 
> \## What happened instead?
> 
> I got an error message:
> 
> \`\`\`
> iMac-ForceBru:Pyto forcebru$ pod
> /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:118:in \`git\_version': Failed to extract git version from \`git --version\` ("git version 2.19.GIT\\n") (RuntimeError)
> from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:130:in \`verify\_minimum\_git\_version!'
> from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:49:in \`run'
> from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/bin/pod:55:in \`\<top (required)\>'
> from /usr/local/bin/pod:22:in \`load'
> from /usr/local/bin/pod:22:in \`\<main\>'
> \`\`\`
> 
> \## macOS info
> A relatively fresh install of macOS Mojave 10.14.4. I tried uninstalling and re-installing CocoaPods. The reinstallation succeeded (I mean, it's the first time I'm installing it anyways).
> 
> \## CocoaPods Environment
> 
> 
> No idea:
> 
> \`\`\`
> iMac-ForceBru:Pyto forcebru$ pod env
> /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:118:in \`git\_version': Failed to extract git version from \`git --version\` ("git version 2.19.GIT\\n") (RuntimeError)
> from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:130:in \`verify\_minimum\_git\_version!'
> from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:49:in \`run'
> from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/bin/pod:55:in \`\<top (required)\>'
> from /usr/local/bin/pod:22:in \`load'
> from /usr/local/bin/pod:22:in \`\<main\>'
> \`\`\`
> 
> \## Project that demonstrates the issue
> 
> I'm trying to build \[Pyto\](https://github.com/ColdGrub1384/Pyto), but I can't even start the \`pod\` command, so I guess it's unrelated.

---

<div class="post-metadata">

**Author:** ![pradeep-samji](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/pradeep-samji/32/33919_2.png) [@pradeep-samji](https://discuss.circleci.com/u/pradeep-samji)\
**Post date:** [October 9, 2023, 8:17pm UTC](https://discuss.circleci.com/t/cocoapods-is-installed-but-broken/49496/5 "2023-10-09T20:17:10Z")

</div>

I appreciate your help. I will check the links you shared and see if I can find something. Thank you.
