Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zsh: command not found: pod - MAcOS Catalina 10.15

I'm running the install with an admin account I tried

sudo gem install cocoapods

and

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

They both run fine with following output

Fetching cocoapods-1.9.1.gem
Successfully installed cocoapods-1.9.1
Parsing documentation for cocoapods-1.9.1
Installing ri documentation for cocoapods-1.9.1
Done installing documentation for cocoapods after 2 seconds
1 gem installed

however, a simple

pod --version

Returns

zsh: command not found: pod

I'm not too good at managing users accounts or dealing with command shell but I scoured the net and couldn't find a solution. It looks like wherever pod is installed, it doesn't make it to the list of executable applications

like image 337
GrandSteph Avatar asked May 18 '20 10:05

GrandSteph


2 Answers

The issue was that command line for XCODE was not installed.

First I updated to latest Ruby version and put the version number in the second command (in place of [version]

curl -L https://get.rvm.io | bash -s stable

rvm install ruby-[version] 

During the install you will see the Software update available from MAcOS popup. Install immediately and continue with prompts in that window (I believe it asks for updates and then asks for install.

It will take a while to run / download / install (it took 2 expressos for me :) )

After that I ran

sudo gem install cocoapods

And restarted my terminal. Now checking it's installed

pod --version

Returns the installed version (1.9.1 for me)

like image 84
GrandSteph Avatar answered Sep 24 '22 14:09

GrandSteph


I followed these instructions but ended up with the same issue. So I ran gem list | grep cocoapods and then uninstalled every instance of cocoapods with gem uninstall cocoapods along with the executables. Then I decided to install cocoapods using Homebrew with brew install cocoapods, restarted my Mac and the pod command was available. Remember I didn't restart my Mac after using sudo gem install cocoapods,maybe that will work too, you can try.

like image 45
Gwamaka Charles Avatar answered Sep 24 '22 14:09

Gwamaka Charles