Hello,
After a clean install of Ubuntu 16.04 LTS, I execute the following steps with root user :
- export LC_ALL=C
- apt-get update
- apt-get upgrade
- apt-get install python-minimal
- apt-get install build-essential python-setuptools
- cd /root/
- mkdir ErpNext
- cd /root/ErpNext
- wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
- sudo python install.py
I receive a fatal error on
“TASK [init bench] **** fatal: [localhost]: FAILED!”
Traceback (most recent call last):
File “install.py”, line 388, in
install_bench(args)
File “install.py”, line 114, in install_bench
run_playbook(‘production/install.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 326, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘production/install.yml’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2
Do you have any idea to help me ?
Thanks
Caroline
Which provider are you using.
gandi.net, It is a french provider
Before i have the same problem with scaleway so i switched to linode.
Maybe the same
Try other one
Regards
Ok thanks for the tip but it is not really this kind of advice that I’m waiting for 
any one can help me to solve my issues ?
I don’t think I used root to run the script - I just used my normal user. Whether this makes a difference I am not sure. If it is easy I would wipe your Ubuntu server and rerun as your normal user account. The error is related to how the script runs as a user called ‘frappe’ which is normally the user that is used whilst doing updates etc
ie subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘production/install.yml’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2
command no. 10 implies that running as root is incorrect too ie
sudo python install.py
would only be used if you were running as a normal user as you don’t need to use sudo if you are already running as root
Ok, I reexecute the install.py with this command :
11) python install.py -production
And I receive the good new : “Frappe/ERPNext has been successfully installed!”
Thanks for your help ! 
ah - brilliant 
Pleased to be of help … it was only a hunch but I guess I was right … 
Have fun with ERPNext and you know where we are if you need any help or assistance …
1 Like