jdog jdog - 7 months ago 73
Python Question

Ansible install from source - hacking/env-setup fails

I'm trying to install ansible from source. I have done:

sudo apt-get install python2.7-dev
sudo pip install paramiko PyYAML Jinja2 httplib2
git clone git://github.com/ansible/ansible.git --recursive

Then, when I try

~/src/ansible$ source ./hacking/env-setup

I get

: command not found
: command not found
bash: ./hacking/env-setup: line 17: syntax error near unexpected token `elif'
'ash: ./hacking/env-setup: line 17: `elif [ $(basename -- "$0") = "env-setup" ]; then

Any idea what is missing?


Do you happen to have dos line endings in your env-setup? Check your core.autocrlf setting, that should not be true. If it is, do:

git config --global core.autocrlf false