ERPNext install fails for Ubuntu 16 due to ansible missing

Hello comunity. Work requires me to set up a new server with ERPNext. Since the upgrade to V12 however, the installation script has changed a little. I followed these instructions.

Now I’m getting following error:

So apparently it stops when trying to install ansible. I then manually installed ansible using apt-get, but that didn’t help, same error.

Any tipps? Should I try to install ansible using pip?
Regards

Dont use Ubuntu 16. You will have problems in report generation. Use Ubuntu 18.

I am currntly struggling with getting ERPNext installed on a fresh Ubuntu 18.04 server as you can see in my other posts.

Good look with that!

Actually I’m simultaneously installing a fresh ERPNext on Ubuntu 18.04. While 16 indeed struggles to install it went without problems on 18. However a 16 server might still be needed due to a project I’m working on.

Seems to be an issue with the installer, I am getting this on a vanilla Debian 10:

$ sudo python3 install.py --production --user frappe
Traceback (most recent call last):
  File "install.py", line 422, in <module>
    install_bench(args)
  File "install.py", line 221, in install_bench
    run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 339, in run_playbook
    success = subprocess.check_call(args, cwd=os.path.join(cwd, 'playbooks'), stdout=log_stream, stderr=sys.stderr)
  File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-vvvv', '-e', '@/tmp/extra_vars.json', '--become', '--become-user=frappe']' returned non-zero exit status 2.
1 Like

Any updates on this? What happens if you run

$ sudo ansible-playbook -c local .bench/playbooks/site.yml -vvvv -e @/tmp/extra_vars.json --become --become-user=frappe
1 Like

I tried to install ERPNext on a fresh Ubuntu 16 server again and did not get this error again, without trying your solution. Now, the VM crashed during installation and the bench is not working but I did not get the initial error mentioned in the first post. So I assume that the install script has been fixed. I have not tested this with debian however.

@lasalesi:

Upon running

$ sudo ansible-playbook -c local .bench/playbooks/site.yml -vvvv -e @/tmp/extra_vars.json --become --become-user=frappe

I get an error in regards to setuptools

"pkg_resources.DistributionNotFound: The 'setuptools==40.8.0' distribution was not found and is required by bench"

Which is confusing since if I type in pip3 list from the command line it returns

pip3 list

setuptools          40.8.0

I get this on both Debian 10 and Debian 9. On the 16th of March I installed ERPNext onto the same Debian 9 image without any problems but now it fails.

strange… but we observe the exact same… has anyone figured this out?

Maybe this can help:

Unfortunately, the above mentioned thread did not solve the issue. On the affected instance, running

$ sudo ansible-playbook -c local .bench/playbooks/site.yml -vvvv -e @/tmp/extra_vars.json --become --become-user=frappe

Reveals a missing npm dependency:

fatal: [localhost]: FAILED! => {
    "changed": false,
    "cmd": "npm install -g yarn",
    "invocation": {
        "module_args": {
            "_raw_params": "npm install -g yarn",
            "_uses_shell": false,
            "argv": null,
            "chdir": null,
            "creates": null,
            "executable": null,
            "removes": null,
            "stdin": null,
            "stdin_add_newline": true,
            "strip_empty_ends": true,
            "warn": true
        }
    },
    "msg": "[Errno 2] No such file or directory: 'npm': 'npm'",
    "rc": 2
}

This can be manually resolved with

$ sudo apt install npm
1 Like

Today, my root cause was a dependency issue during install: on Debian 10.3, it tried to bind in apt sources from Digitalocean from the debian 10.2 repo. In this, libmariadb3 has replaced libmariadbclient18 and hence the two blocked each other.

Resolution: change to version 10.3

$ sudo nano /etc/apt/sources.list.d/ams*.conf

Replace URL “10.2” with “10.3”

$ sudo apt update
$ sudo apt install libmariadbclient18

After that, the install works.

Maybe that helps someone

Do try the below commands, it might work for you

sudo chown redis /var/run/redis
sudo nano /etc/redis/redis.conf
Edit bind 127.0.0.1 ::1 To bind 127.0.0.1 in the “redis.conf”

then try re-running the install.py