Monday, April 9, 2012

/usr/bin/s3cmd: unrecognized option `--configure'

Advertisements


s3cmd is a tool for uploading, downloading and managing file and directories with amazon simple storage s3. But while configuring s3cmd in your amazon ce2 cloud instance you may get the following error. I got this error in my centos 5.4 instance on amazon ec2.
/usr/bin/s3cmd: unrecognized option `--configure'

[root@xxxxxxxx ~]# s3cmd --configure
/usr/bin/s3cmd: unrecognized option `--configure'
s3cmd [options] <command> [arg(s)]              version 1.2.6
  --help    -h        --verbose     -v     --dryrun    -n
  --ssl     -s        --debug       -d     --progress
  --expires-in=( <# of seconds> | [#d|#h|#m|#s] )

Commands:
s3cmd  listbuckets  [headers]
s3cmd  createbucket  <bucket>  [constraint (i.e. EU)]
s3cmd  deletebucket  <bucket>  [headers]
s3cmd  list  <bucket>[:prefix]  [max/page]  [delimiter]  [headers]
s3cmd  location  <bucket> [headers]
s3cmd  delete  <bucket>:key  [headers]
s3cmd  deleteall  <bucket>[:prefix]  [headers]
s3cmd  get|put  <bucket>:key  <file>  [headers]
[root@xxxxxxx ~]#

Solution:
You have to reinstall the s3cmd package as follows.
you can get the repo from here
http://s3tools.org/repo/RHEL_5/

save the repo in your /etc/yum.repos.d/ as follows


[root@xxxxxxx ~]# cat /etc/yum.repos.d/s3cmd.repo
#
# Save this file to /etc/yum.repos.d on your system
# and run "yum install s3cmd"
#
[s3tools]
name=Tools for managing Amazon S3 - Simple Storage Service (RHEL_5)
type=rpm-md
baseurl=http://s3tools.org/repo/RHEL_5/
gpgcheck=1
gpgkey=http://s3tools.org/repo/RHEL_5/repodata/repomd.xml.key
enabled=1
[root@xxxxxxx ~]#


After that

Install it using yum:

yum install s3cmd

Now configure it. It will ask your access key, secret key and encryption key(just hit enter if you don't want).
s3cmd --configure

Now you will be able to list your buckets in your amazon s3 storage using the following command.
s3cmd ls

No comments:

Post a Comment

Be nice. That's all.