Reputation: 1026
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
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
Reputation: 983
I also encountered this issue when I upgraded to Catalina and XCode 11. Here's what I did to fix this:
XCode > Preferences > Locations > Command Line Tools > XCode 11.X.X
sudo gem install cocoapods -n /usr/local/bin
Upvotes: 21
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
Reputation: 707
Check this one, worked for me
Go to Xcode preferences -> Locations 'tab'.
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
Run sudo gem install -n /usr/local/bin cocoapods
Upvotes: 0
Reputation: 1724
Try this to get cocopods
works on macOS Catalina
$ brew cleanup -d -v
$ brew install cocoapods
Upvotes: 10
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
Reputation: 71
I fixed it by installing cocoa pod again.
sudo gem install cocoapods -n /usr/local/bin
Upvotes: 5
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]
Upvotes: 0
Reputation: 9531
I had this problem with Catalina, to solve I have to made the following steps:
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)"
Execute this command to reinstall cocoa pods: sudo gem install -n /usr/local/bin cocoapods
Upvotes: 1
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