1

I've installed cocoapods by this - https://apple.stackexchange.com/questions/418222/installing-cocoapods-to-macos-catalina/418230#418230

It istalled cocoapods v1.5.2. Now I want to update the version to the latest v1.10.0.

So I've used -

brew upgrade cocoapods

I've also tried this -

brew install cocoapods@1.10.0

But I'm getting -

Error: This command updates brew itself, and does not take formula names.
Use `brew upgrade cocoapods` instead.
Fahims-Mac-mini:~ fahimrahman$ brew upgrade cocoapods
Fahims-Mac-mini:~ fahimrahman$ brew upgrade cocoapods
Fahims-Mac-mini:~ fahimrahman$ brew install cocoapods@1.10.0
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "cocoapods@1.10.0".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.

Also tried this -

sudo gem install cocoapods 

but still is not working on my device. So How can I update the cocoapods version using brew?

5 Answers 5

6

I had the same issue and resolved. This was bugging me, since in the website https://formulae.brew.sh/formula/cocoapods latest stable is 1.10.1 but still brew installed me1.5.4

Figure out The problem by using brew doctor

I got the below warning. Some taps are not on the default git origin branch and may not receive updates. If this is a surprise to you, check out the default branch with: git -C $(brew --repo homebrew/core) checkout master

Then, as per suggestion, I did. (Fix the related issues which comes for you)

git -C $(brew --repo homebrew/core) Then, brew install cocoapods installed the latest version for me. Hope it solves.

2
  • After a whole day stuck this was the only solution that worked. You might also need to run brew link cocoapods after it has installed version 1.10.0 so it replaces the old version. Great answer
    – vin shaba
    Aug 11, 2021 at 18:35
  • I had the same problem. used brew doctor and turns out that the homebrew/core was not tapped properly. I did that and now everything works fine. Dec 7, 2022 at 5:54
2

You can't do much with homebrew.
Homebrew allows installing v1.10.1 only

In my case fix this issue by updating ruby to 2.7 to install cocoapods v1.10.0.

rvm install ruby-2.7

Note: Use the specific version of ruby as per your macOS compatibility

1
  • yes. Firstly I've updated ruby version then I run cocoapods which installs v1.10.1 Thank you. May 8, 2021 at 15:29
1

I uninstalled brew uninstall cocoapods then reinstalled by sudo gem install cocoapods , it worked.

0

For me brew upgrade cocoapods shows Warning: cocoapods 1.11.2_2 already installed, so I've unistalled them with brew uninstall cocoapods and the install again with brew install cocoapods and now pod --version shows 1.11.3

0

I used brew upgrade cocoapods and it works just fine. Take a look at these terminal screenshots. brew upgrade cocoapods upgrading cocoapods

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.