6

I am trying to run the Cloud Bigtable Command Line Tool but seeing this error when I run

cbt help

or any other cbt commands:

-bash: cbt: command not found

I have verified that the gcloud component is installed when I run

gcloud components list

And I see:

Installed     │ Cloud Bigtable Command Line Tool                     │ cbt                      │   4.9 MiB

However, when I run

gcloud info

I see a list of my installed components and their version number in an array. For example:

Installed Components:
core: [2018.07.16]
pubsub-emulator: [2018.02.02]
beta: [2018.07.16]
gsutil: [4.33]
bq: [2.0.34]
cbt: []
bigtable: []

It might be a problem with the PATH not being set correctly, but I'm not sure. It seems related to this issue:

How to set path to kubectl when installed using gcloud components install?

Any ideas?

  • Sorry to hear you're running into this issue! Can you please provide more info in your question, such as: (a) your platform (OS + version), (b) whether you have the same issue with other binaries managed by `gcloud` such as `gsutil` or `bq`, and (c) whether your `$PATH` includes the `.../google-cloud-sdk/bin` (i.e., the installation directory of `gcloud` + `/bin`)? – Misha Brukman Jul 23 '18 at 00:02
  • 1
    (a) Platform: macOS Sierra (b) gsutil and bq do not have the same issue. These are working as expected. If I do `gloud info`, my installed components are: ``` Installed Components: core: [2018.07.16] pubsub-emulator: [2018.02.02] beta: [2018.07.16] gsutil: [4.33] bq: [2.0.34] cbt: [] bigtable: [] ...Cloud SDK on PATH: [False] Kubectl on PATH: [False] ``` Not sure how to check whether $PATH includes .../google-cloud-sdk/bin – baconLikeTheKevin725 Aug 16 '18 at 18:21
  • 1
    `echo $PATH` will tell you what's in your path and whether it includes the `.../google-cloud-sdk/bin` directory. Also look into that directory and see if `cbt` is installed there. – Misha Brukman Aug 16 '18 at 19:23
  • Which method you have used to install the gcloud command? Have you followed the [documentation](https://cloud.google.com/sdk/docs/quickstart-macos) or used homebrew? – Yurci Sep 13 '18 at 12:49

2 Answers2

6

A couple of things to check:

  • Please provide the full output of gcloud info.
  • Make sure that Cloud SDK on PATH is True.
  • You need to have the bin directory of the Installation Root on your PATH.
  • Make sure that the cbt binary is in Installation Root/bin
Igor Bernstein
  • 571
  • 2
  • 5
  • 1
    My Cloud SDK on PATH is set to False. How do I change this? – cbandara Jan 27 '22 at 10:55
  • 1
    On linux/mac mac sure that your environment variable PATH includes the bin directory of the gcloud sdk. ie if you installed the sdk to your home directory then export PATH=$PATH:$HOME/google-cloud-sdk/bin. – Igor Bernstein Jan 28 '22 at 13:19
  • Note, for those that may have installed gcloud with brew, your installation path may look like `/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/latest/google-cloud-sdk/bin`. I'd suggest looking at the `gcloud info` output, specifically the `installation properties` field. – Greg Hilston May 25 '22 at 14:33
1

I think you may have installed Google Cloud tools from Homebrew. In that case you will need to add your google-cloud-sdk bin path that will be inside homebrew path. To find your google-cloud-sdk path you will need to do the following:

  • Run "gcloud info" command.
  • You will find the path printed and it could be "/opt/homebrew/Caskroom/google-cloud-sdk/lastest/google-cloud-sdk"
  • Add that path to your PATHs environment variable and don't forget to append "/bin" to that path
DevSherif
  • 147
  • 2
  • 11