Gcloud components not being installed on local machine

370 views Asked by At

I'm trying to use the gcloud components install to install anthoscli and kpt on my local machine but eventhough they are installed, everytime I try to run them as commands (e.g anthoscli apply) my zsh shell says there's no such command (eventhough kubectl works fine).

I tried to just to find where the component binaries are installed and then point to them in my .zshrc file but I couldn't find anywhere online that points to their file directory. The components seem to work as normal in my google cloud shell but not locally; any ideas?

1

There are 1 answers

0
Mr.KoopaKiller On BEST ANSWER

You just need to search fot the command and include the directory in you $PATH variable.

To find the command anthoscli you should use the command:

find -name "*anthoscli*" -type f /

With the result, you can add the following line in your ~/.zshrc:

PATH="$PATH:<directory_found_in_previous_command>"

Then simply "reload" your zsh configuration with:

source ~/.zshrc