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

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (1)

Collapse
 
respect17 profile image
Kudzai Murimi

Thanks!

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay