Trying to run cbt (Cloud Bigtable Command Line Tool) from Google SDK
Asked Answered
Z

2

7

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?

Zeuxis answered 20/7, 2018 at 21:13 Comment(4)
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)?Print
(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/binZeuxis
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.Print
Which method you have used to install the gcloud command? Have you followed the documentation or used homebrew?Racoon
H
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
Heinrik answered 23/7, 2018 at 14:34 Comment(3)
My Cloud SDK on PATH is set to False. How do I change this?Vaginate
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.Heinrik
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.Abnaki
E
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
Evictee answered 8/12, 2022 at 21:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.