This terminal won't let me run or install cocoa pods because I am on MacOS Catalina Beta?

Cocoapods

Cocoapods Problem Overview


I am interested in installing one of the GitHub repos that requires installing CocoaPods. There is no problem with my terminal (seems fine in a normal macOS version). I have one problem though: terminal is not installing CocoaPods, seemingly because I'm on the macOS Catalina beta?

I did install the pod 'Card' from Podfile which finished but after that Podfile closes. I am going running "pod install" on the terminal, then the only error that I get is:

-bash: /usr/local/bin/pod: / 
System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory". 

Does someone know how to fix this issue for macOS Catalina?

Cocoapods Solutions


Solution 1 - Cocoapods

sudo gem install -n /usr/local/bin cocoapods 

worked for me

Solution 2 - Cocoapods

Use

brew install cocoapods --build-from-source

The Mojave bottle is linked to a different version of Ruby. The --build-from-source option will link the cocoapods gem to the Catalina version of Ruby.

Solution 3 - Cocoapods

I also encountered this issue when I upgraded to Catalina and XCode 11. Here's what I did to fix this:

  1. Select Command Line Tools in XCode. > XCode > Preferences > Locations > Command Line Tools > XCode 11.X.X

  2. In terminal execute: >sudo gem install cocoapods -n /usr/local/bin

Solution 4 - Cocoapods

Try this to get cocopods works on macOS Catalina

$ brew cleanup -d -v    
$ brew install cocoapods

Solution 5 - Cocoapods

I fixed it by installing cocoa pod again.

sudo gem install cocoapods -n /usr/local/bin

Solution 6 - Cocoapods

I had not been able to solve use this one

sudo gem install -n /usr/local/bin cocoapods

Before this command I ran the following command and reinstalled cocoapod.

xcode-select --install

.

This worked for me

 xcode-select --install
 sudo gem install -n /usr/local/bin cocoapods

Solution 7 - Cocoapods

I had this problem with Catalina, to solve I have to made the following steps:

  1. Install XCode Command Line Tools, I recommend install the HomeBrew to solve that dependency: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

  2. Execute this command to reinstall cocoa pods: sudo gem install -n /usr/local/bin cocoapods

Solution 8 - Cocoapods

    [![If cannot install new version cocoapods, example below:
    1. Please remove Command line tools
    sudo rm -rf /Library/Developer/CommandLineTools
    2. Install new Command line tools version
    sudo xcode-select --install
    3. after installing run below command
    open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg]

enter image description here

Solution 9 - Cocoapods

Check this one, worked for me

  1. Go to Xcode preferences -> Locations 'tab'.

  2. Check the Command Line Tools section. If it's blank, make sure your current command line tools is selected. XCode > Preferences > Locations > Command Line Tools > XCode 11.X.X

  3. Run sudo gem install -n /usr/local/bin cocoapods

Solution 10 - Cocoapods

So, issue is that in Mac OSX Catalina. The folder path /usr/local/bin is private.

So, Step 1: Install Homebrew. "Homebrew lets your access private folders and enables them to public".

Step 2: Restart Terminal or restart Mac OSX.

Step 3: Run sudo gem install cocoapods or sudo gem install -n /usr/local/bin cocoapods

Step 4: Let the setup complete

Step 5: Run pod setup

Finished :)

Solution 11 - Cocoapods

Try to install cocoapods using brew

brew install cocoapods --build-from-source

if u have already installed cocoapods using brew it will not let you install cocoapods then try

brew link --overwrite cocoapods

then write

pod setup --verbose

hope it will work.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAntonio Adrian ChavezView Question on Stackoverflow
Solution 1 - CocoapodsonthemoonView Answer on Stackoverflow
Solution 2 - CocoapodsI make my markView Answer on Stackoverflow
Solution 3 - Cocoapodssuperm0View Answer on Stackoverflow
Solution 4 - CocoapodsAtanu MondalView Answer on Stackoverflow
Solution 5 - CocoapodsK Ravi KumarView Answer on Stackoverflow
Solution 6 - CocoapodsParkView Answer on Stackoverflow
Solution 7 - CocoapodsÂngelo PolottoView Answer on Stackoverflow
Solution 8 - CocoapodssiddhantView Answer on Stackoverflow
Solution 9 - CocoapodsAzeTechView Answer on Stackoverflow
Solution 10 - Cocoapodsuser14758858View Answer on Stackoverflow
Solution 11 - CocoapodsShakir hurrahView Answer on Stackoverflow