1
kfll 2014-08-06 21:56:55 +08:00 via Android
127是命令没找到吧…试着看看环境变量
|
3
no13bus OP |
4
no13bus OP |
5
siteshen 2014-08-06 23:23:40 +08:00 1
fabric默认使用bash执行命令,服务器上安装没有bash?
两种解决方案:1. 服务器上安装bash(为什么这个都没有??!!);2. 参考fabric.api.run函数的文档,指定env.shell: run(command, shell=True, **kwargs) Run a shell command on a remote host. If ``shell`` is True (the default), `run` will execute the given command string via a shell interpreter, the value of which may be controlled by setting ``env.shell`` (defaulting to something similar to ``/bin/bash -l -c "<command>"``.) Any double-quote (``"``) or dollar-sign (``$``) characters in ``command`` will be automatically escaped when ``shell`` is True. |
7
no13bus OP run(command, shell=False, **kwargs)已经解决
|
8
dafang 2014-08-07 07:46:39 +08:00
fabric 代码写的还是太多,推荐用ansible
|