Antonio A. Chavez
Antonio A. Chavez

Reputation: 1026

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

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?

Upvotes: 73

Views: 49363

Answers (11)

Shakir hurrah
Shakir hurrah

Reputation: 58

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.

Upvotes: 0

superm0
superm0

Reputation: 983

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

  1. In terminal execute:

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

Upvotes: 21

user14758858
user14758858

Reputation: 1

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 :)

Upvotes: 0

AzeTech
AzeTech

Reputation: 707

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

Upvotes: 0

Atanu Mondal
Atanu Mondal

Reputation: 1724

Try this to get cocopods works on macOS Catalina

$ brew cleanup -d -v    
$ brew install cocoapods

Upvotes: 10

Park
Park

Reputation: 411

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

Upvotes: 5

K Ravi Kumar
K Ravi Kumar

Reputation: 71

I fixed it by installing cocoa pod again.

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

Upvotes: 5

siddhant
siddhant

Reputation: 39

    [![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

Upvotes: 0

Ângelo Polotto
Ângelo Polotto

Reputation: 9531

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

Upvotes: 1

I make my mark
I make my mark

Reputation: 849

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.

Upvotes: 47

onthemoon
onthemoon

Reputation: 3462

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

worked for me

Upvotes: 206

Related Questions