2

Actually I have just installed gsutil by following the instructions here.

But now when I am typing gsutil at command prompt I am getting following:

No command was given.
Choose one of -b, -d, -e, or -r to do something. 
Try `/usr/bin/gsutil --help' for more information.

What can be my mistake or am I supposed to do something else?

Is it due to that I have not set correct path in my .bashrc file? Following path is set by me in .bashrc file:

export PATH=${PATH}:$usr/bin/gsutil

and firstly I had set it to:

export PATH=${PATH}:$HOME/vishal/Downloads/gsutil/gsutil
qbi
  • 19,125

3 Answers3

2

As noted at https://stackoverflow.com/questions/7989741/how-to-configure-gsutil, the "No command was given" message is returned by the program gsutil in the Ubuntu package gsutil. That is not the Google Cloud Storage utility, but an older program to "configure and manage GrandStream BudgeTone 100 VOIP and GS2000 phones." This is mentioned in a prominent "Warning" in a red box on the Google help page that you link to.

Although you could probably fix this problem by configuring your PATH correctly (so that the Google gsutil is found before the gsutil from the Ubuntu package), if you don't have a "BudgeTone" phone, you can also simply uninstall the Ubuntu package gsutil.

khaeru
  • 36
1

The program gsutil needs some more arguments to run. So gsutil alone will not produce anything helpfuk, except the output you pasted. So i.e. to upload your PNG photos issue the command

gsutil cp *.png gs://my_pngs

Just have a look at the gsutil Reference Guide. This document explains how you should use gsutil.

But also your definition of the $PATH seems not correct. You wrote:

export PATH=${PATH}:$usr/bin/gsutil

Have you really set a variable $usr? I assume you want to use the directory /usr. If this is your intention you should substitute the $ and write a / instead. The second questions that comes into mind is: Is /usr/bin/gsutil a directory? I assume this is your executable file. So your definition will not work anyway. If you try to enter echo $PATH you will see that /usr/bin is already defined as part of your path. So gsutil will be called like any other program and there is no need setting the PATH variable.

qbi
  • 19,125
  • This path has been set by me in .bashrc file export PATH=${PATH}:/HOME/vishal/Downloads/gsutil/gsutil

    and when i do echo $PATH,this gets displayed

    /HOME/vishal/Downloads/gsutil/gsutil

    but still when i do gsutil config or gsutil mb gs://(say gsutil mb gs://Project) it displays

    No command was given.

    Choose one of -b, -d, -e, or -r to do something. Try `/usr/bin/gsutil --help' for more informatio

    – vishal mahajan Nov 02 '12 at 09:26
  • What happens when you enter: ~/Downloads/gsutil/gsutil config? What is the output of which gsutil? – qbi Nov 02 '12 at 10:16
  • hi qbi the following message i getNo command was given.

    Choose one of -b, -d, -e, or -r to do something. Try `/usr/bin/gsutil --help' for more information

    – vishal mahajan Nov 02 '12 at 10:22
  • Have you entered the command exactly like I wrote it down? What is the output of the second command (which gsutil)? – qbi Nov 02 '12 at 10:39
  • hi qbi, Acually gsutil is in my /Downlaods/gsutil/gsutil folder Now when i go to /download/gsutil and enter the command gsutil config(as prescribed in gsutil document https://developers.google.com/storage/docs/gsutil_install) i got following output No command was given.

    Choose one of -b, -d, -e, or -r to do something. Try `/usr/bin/gsutil --help' for more information.

    – vishal mahajan Nov 02 '12 at 10:53
  • I understand what you did. But to find out more about an eventual error it would be nice to do exactly what I wrote. This would help me to get an idea what goes wrong. – qbi Nov 02 '12 at 11:44
  • Basically i think the Gsutil which has been given on https://developers.google.com/storage/docs/gsutil_install is actually the The Grandstream BudgeTone 100 VOIP and GX2000 telephones and these are telephones that does VOIP, from a company called Grandstream.So that is why the follwoing output is comming

    vishal@XXXX:~$ gsutil cp *.png gs://my_pngs No command was given.

    Choose one of -b, -d, -e, or -r to do something. Try `/usr/bin/gsutil --help' for more information.

    But then from where to get thae GSutil which is command line tool for interaction with google cloud storage

    – vishal mahajan Nov 02 '12 at 12:04
1

Rather than downloading and installing from the internet I strongly recommend to use the built-in package management in Ubuntu.

This makes sure that applications are tested to run on your distribution version, and it also ensures that applications are installed in the appropriate place in the file system. It also lets you easily remove an application in case you don't need it anymore.

To do so search for an application in the Ubuntu Software Center.

You can install gsutil on your system via an apt command with sudo apt install gsutil in all currently supported versions of Ubuntu.

Only rarely you may have to add a ppa as a software source from which you know you can install an application that is not available otherwise.

Only as a last resort you can also install an application from its source code or from an installation program that may be offered (e.g. in case of closed source software). Such software may not be tested to run without issues.

karel
  • 114,770
Takkat
  • 142,284