DEV Community

Matt Ruiz
Matt Ruiz

Posted on

command not found: gsutil

Hola hola,

I ran into this error when trying to retrieve the most recent backup we have for one of our apps that use Firebase Cloud Functions.

Here's the command I was trying to run from our Cloud Function Node project:

gsutil ls -l gs://{APP_FIRESTORE}-backup/backups/ | sort -k2 | tail -n1
Enter fullscreen mode Exit fullscreen mode

Looking to Google

I typed command not found: gsutil cloud functions nodejs into Google and found this Google Cloud documentation.

After downloading and extracting the .tar.gz file from step 2, I ran the following two commands from the folder that contains the extracted .tar.gz:

  • ./google-cloud-sdk/install.sh in the folder where the extracted .tar.gz existed (which was Downloads for me).
  • ./google-cloud-sdk/bin/gcloud init
    • This part can happen fast and you may chose the wrong project like I did. Here's a quick post about switching projects.
    • Note: You may need to restart your terminal after installing gcloud.

That worked for my situation and I hope it helps others getting the command not found: gsutil.

  • Matt

Top comments (1)

Collapse
 
respect17 profile image
Kudzai Murimi

Thanks!