Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install cocoapods on latest macOS #12145

Closed
1 task done
kaimacuser opened this issue Nov 11, 2023 · 5 comments
Closed
1 task done

install cocoapods on latest macOS #12145

kaimacuser opened this issue Nov 11, 2023 · 5 comments

Comments

@kaimacuser
Copy link

kaimacuser commented Nov 11, 2023

Report

What did you do?

I tried to install cocoapods on macOS Sonoma 14.1.1 (on MacbookAir and MacMini)
sudo gem install cocoapods

What did you expect to happen?

I expected that pod is installed width all dependencies correctly.

What happened instead?

I received an error message:
ERROR: Error installing cocoapods: There are no versions of cocoapods-downloader (>= 2.0) compatible with your Ruby & RubyGems. Maybe try installing an older version of the gem you're looking for? cocoapods-downloader requires Ruby version >= 2.7.4. The current ruby version is 2.6.10.210.

Temporary Solution

It trys to install cocoapods but runs into an error because the version of ruby, that is delivered with macOS, seems to be too old for installing the latest version of cocoapods.

The solution for me was to install an older version of cocoapods which seems to be based on Ruby 2.6.* (the version macOS ist delivered with). While executing the command I was asked to install a few other things, so the final order was:

  1. sudo gem install drb -v 2.0.5
  2. sudo gem install activesupport -v 6.1.7.6
  3. sudo gem install cocoapods -v 1.13.0
@kaimacuser kaimacuser changed the title install cocoapods on macOS install cocoapods on latest macOS Nov 11, 2023
@saldous
Copy link

saldous commented Nov 13, 2023

Duplicate of: #12122

@MaxHsu911
Copy link

It works!! Thanks for sharing!!

@AbdulAmmic
Copy link

AbdulAmmic commented Feb 5, 2024

It works, Thank you.

@ociclica
Copy link

Worked perfectly, thanks!

@elvsp1n
Copy link

elvsp1n commented Apr 13, 2024

Try upgrading ruby before installing cocoapods with:

brew install ruby
echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.zshrc
echo 'export LDFLAGS="-L/usr/local/opt/ruby/lib"' >> ~/.zshrc 
echo 'export CPPFLAGS="-I/usr/local/opt/ruby/include"' >> ~/.zshrc
. ~/.zshrc
ruby -v
sudo gem install cocoapods
# Optional
# At the moment of writing, there seems to be an update for the gems, apply it with the following
sudo gem update --system 3.5.9

Cheers,
EE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants