Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
share|improve this question
add comment

3 Answers

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.

share|improve this answer
    
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://<anybucketName>(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 2 '12 at 9:26
    
What happens when you enter: ~/Downloads/gsutil/gsutil config? What is the output of which gsutil? –  qbi Nov 2 '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 2 '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 2 '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 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 2 '12 at 10:53
show 2 more comments

Rather than downloading and installing from the Internet I strongly recommend to use the package management inbuilt to Ubuntu.

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

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

Below is a link to install gsutil on your system via the Ubuntu package management:

Install via the software center

Alternatively you may click here on the shopping bag right to gsutil Install gsutil

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

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

share|improve this answer
add comment

As noted at http://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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.