我正在运行结构(Django 部署到 apache),一切似乎都运行良好,直到我完成安装站点的任务:
def install_site():
"Add the virtualhost file to apache"
require('release', provided_by=[deploy, setup])
sudo('cd %(path)/releases/%(release)/%(release); cp %(project_name)/%(virtualhost_path)/%(project_domain) /etc/apache2/sites-available/%(project_domain)s')
sudo('cd /etc/apache2/sites-available; a2ensite %(project_domain)')
我不断收到此错误:
[173.203.124.16] sudo: cd %(path)/releases/%(release)/%(release);
[173.203.124.16] err: /bin/bash: -c: line 0: syntax error near unexpected token
`('
[173.203.124.16] err: /bin/bash: -c: line 0: `cd %(path)/releases/%(release)/%(r
elease);'
Warning: sudo() encountered an error (return code 2) while executing 'cd %(path)
/releases/%(release)/%(release);'
我一遍又一遍地浏览了 fabfile.py ,我看不出为什么会出现错误……有什么想法吗?