设置CFNCluster时出错

时间:2016-05-14 22:26:07

标签: bash

我已按照以下网站的说明设置cfncluster http://cfncluster.readthedocs.io/en/latest/getting_started.html

使用此命令安装cfncluster后

sudo pip install cfncluster

我运行了命令

cfncluster configure 

但它说:

  

bash:cfncluster:找不到命令

有谁能告诉我这里出了什么问题?

请找到以下输出:

[ec2-user@ip-00-00-0-000 ~]$ sudo su

[root@ip-00-00-0-000 ec2-user]# sudo pip uninstall cfncluster

You are using pip version 6.1.1, however version 8.1.2 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.
Uninstalling cfncluster-1.2.1:

 /usr/local/bin/cfncluster
  /usr/local/lib/python2.7/site-packages/cfncluster-1.2.1.egg-info
  /usr/local/lib/python2.7/site-packages/cfncluster/__init__.py
  /usr/local/lib/python2.7/site-packages/cfncluster/__init__.pyc
  /usr/local/lib/python2.7/site-packages/cfncluster/cfncluster.py
  /usr/local/lib/python2.7/site-packages/cfncluster/cfncluster.pyc
  /usr/local/lib/python2.7/site-packages/cfncluster/cfnconfig.py
  /usr/local/lib/python2.7/site-packages/cfncluster/cfnconfig.pyc
  /usr/local/lib/python2.7/site-packages/cfncluster/cli.py
  /usr/local/lib/python2.7/site-packages/cfncluster/cli.pyc
  /usr/local/lib/python2.7/site-packages/cfncluster/config_sanity.py
  /usr/local/lib/python2.7/site-packages/cfncluster/config_sanity.pyc
  /usr/local/lib/python2.7/site-packages/cfncluster/easyconfig.py
  /usr/local/lib/python2.7/site-packages/cfncluster/easyconfig.pyc
  /usr/local/lib/python2.7/site-packages/cfncluster/examples/config

Proceed (y/n)? y
  Successfully uninstalled cfncluster-1.2.1


[root@ip-00-00-0-000 ec2-user]# sudo pip install cfncluster
You are using pip version 6.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting cfncluster
  Using cached cfncluster-1.2.1.tar.gz
Requirement already satisfied (use --upgrade to upgrade): boto>=2.39 in /usr/local/lib/python2.7/site-packages (from cfncluster)
Requirement already satisfied (use --upgrade to upgrade): awscli>=1.10.13 in /usr/local/lib/python2.7/site-packages (from cfncluster)
Requirement already satisfied (use --upgrade to upgrade): rsa<=3.3.0,>=3.1.2 in /usr/lib/python2.7/dist-packages (from awscli>=1.10.13->cfncluster)
Requirement already satisfied (use --upgrade to upgrade): s3transfer==0.0.1 in /usr/local/lib/python2.7/site-packages (from awscli>=1.10.13->cfncluster)
Requirement already satisfied (use --upgrade to upgrade): botocore==1.4.19 in /usr/local/lib/python2.7/site-packages (from awscli>=1.10.13->cfncluster)
Requirement already satisfied (use --upgrade to upgrade): colorama<=0.3.3,>=0.2.5 in /usr/local/lib/python2.7/site-packages (from awscli>=1.10.13->cfncluster)
Requirement already satisfied (use --upgrade to upgrade): docutils>=0.10 in /usr/local/lib/python2.7/site-packages (from awscli>=1.10.13->cfncluster)
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.3 in /usr/local/lib/python2.7/site-packages (from rsa<=3.3.0,>=3.1.2->awscli>=1.10.13->cfncluster)
Requirement already satisfied (use --upgrade to upgrade): futures<4.0.0,>=2.2.0 in /usr/local/lib/python2.7/site-packages (from s3transfer==0.0.1->awscli>=1.10.13->cfncluster)
Requirement already satisfied (use --upgrade to upgrade): jmespath<1.0.0,>=0.7.1 in /usr/local/lib/python2.7/site-packages (from botocore==1.4.19->awscli>=1.10.13->cfncluster)
Requirement already satisfied (use --upgrade to upgrade): python-dateutil<3.0.0,>=2.1 in /usr/local/lib/python2.7/site-packages (from botocore==1.4.19->awscli>=1.10.13->cfncluster)
Requirement already satisfied (use --upgrade to upgrade): six>=1.5 in /usr/local/lib/python2.7/site-packages (from python-dateutil<3.0.0,>=2.1->botocore==1.4.19->awscli>=1.10.13->cfncluster)

Installing collected packages: cfncluster

 Running setup.py install for cfncluster
Successfully installed cfncluster-1.2.1

[root@ip-00-00-0-000 ec2-user]# sudo cfncluster configure
sudo: cfncluster: command not found
[root@ip-00-00-0-000 ec2-user]# cd /usr/local/lib/python2.7/site-packages
[root@ip-00-00-0-000 site-packages]# ls -l
total 160
drwxr-xr-x  6 root root  4096 May 13 19:11 awscli
drwxr-xr-x  2 root root  4096 May 13 19:11 awscli-1.10.28.dist-info
drwxr-xr-x 57 root root  4096 May 14 18:59 boto
drwxr-xr-x  2 root root  4096 May 14 18:59 boto-2.40.0.dist-info
drwxr-xr-x  5 root root  4096 May 13 19:11 botocore
drwxr-xr-x  2 root root  4096 May 13 19:11 botocore-1.4.19.dist-info
drwxr-xr-x  3 root root  4096 May 16 04:24 cfncluster
drwxr-xr-x  2 root root  4096 May 16 04:24 cfncluster-1.2.1.egg-info
drwxr-xr-x  2 root root  4096 May 14 18:59 colorama
drwxr-xr-x  2 root root  4096 May 14 18:59 colorama-0.3.3.egg-info
drwxr-xr-x  3 root root  4096 May 13 19:11 concurrent
drwxr-xr-x  4 root root  4096 May 14 18:59 dateutil
drwxr-xr-x  8 root root  4096 May 14 18:59 docutils
drwxr-xr-x  2 root root  4096 May 14 18:59 docutils-0.12.egg-info
drwxr-xr-x  2 root root  4096 May 13 19:11 futures-3.0.5.dist-info
drwxr-xr-x  2 root root  4096 May 14 18:59 jmespath
drwxr-xr-x  2 root root  4096 May 14 18:59 jmespath-0.9.0.dist-info
drwxr-xr-x  5 root root  4096 May 14 18:59 pyasn1
drwxr-xr-x  2 root root  4096 May 14 18:59 pyasn1-0.1.9.dist-info
drwxr-xr-x  2 root root  4096 May 14 18:59 python_dateutil-2.5.3.dist-info
-rw-r--r--  1 root root   119 Dec  8 18:25 README
drwxr-xr-x  2 root root  4096 May 13 19:11 s3transfer
drwxr-xr-x  2 root root  4096 May 13 19:11 s3transfer-0.0.1.dist-info
drwxr-xr-x  2 root root  4096 May 14 18:59 six-1.10.0.dist-info
-rw-r--r--  1 root root 30098 May 14 18:59 six.py
-rw-r--r--  1 root root 29545 May 14 18:59 six.pyc

[root@ip-00-00-0-000 site-packages]# cd cfncluster

[root@ip-00-00-0-000 cfncluster]# cfncluster configure

bash: cfncluster: command not found

[root@ip-00-00-0-000 cfncluster]#

[root@ip-10-00-0-000 cfncluster]# which cfncluster
/usr/bin/which: no cfncluster in (/sbin:/bin:/usr/sbin:/usr/bin:/opt/aws/bin)
[root@ip-10-00-0-000 cfncluster]#

1 个答案:

答案 0 :(得分:0)

将“/ usr / local / bin”添加到PATH后,cfncluster命令未找到问题已解决

[root@ip-00-00-0-000 etc]# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/opt/aws/bin
[root@ip-00-00-0-000 etc]# export PATH="/usr/local/bin:$PATH"
[root@ip-00-00-0-000 etc]# echo $PATH
/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/aws/bin