How to install ERPNext on ubuntu 18.04 WSL?

Hi,
I am struggling to install ERPNext on ubuntu WSL 18.04 LTS installed under windows 10.

First is it doable? if yes then how?

If you can share correct successful steps/guidance it will be great.

Note: I went through all notes in the forum but failed all.

Rgds
Nofal

I would really help to share at which point you experienced failure.

you can try this

Thanks @crafter, I have repeated steps today and faced same error,

please find below all steps which I have executed, at the end the error message

windows 10 home
version : 1803

Installed ubuntu wsl 18.04.02

logged in using my unix user nofal

  • nofal@LAPTOP-5F23F7J8:~$ sudo apt-get update

  • nofal@LAPTOP-5F23F7J8:~$ sudo apt-get upgrade

  • nofal@LAPTOP-5F23F7J8:~$ lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic

  • nofal@LAPTOP-5F23F7J8:~$ sudo su -

  • root@LAPTOP-5F23F7J8:~# apt-get install python-minimal

  • root@LAPTOP-5F23F7J8:~# apt-get install build-essential python-setuptools

  • root@LAPTOP-5F23F7J8:~# wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py

  • root@LAPTOP-5F23F7J8:~# adduser frappe

  • root@LAPTOP-5F23F7J8:~# usermod -aG sudo frappe

  • root@LAPTOP-5F23F7J8:~# python install.py --production --site localhost --user frappe

reach this point and error message shown

[WARNING]: Could not find aptitude. Using apt-get instead

failed: [localhost] (item=[‘dnsmasq’, ‘fontconfig’, ‘git’, ‘htop’, ‘libcrypto+±dev’, ‘libfreetype6-dev’, ‘liblcms2-dev’, ‘libssl1.0-dev’, ‘libwebp-dev’, ‘libxext6’, ‘libxrender1’, ‘libxslt1-dev’, ‘libxslt1.1’, ‘libffi-dev’, ‘ntp’, ‘postfix’, ‘python3-dev’, ‘python-tk’, ‘screen’, ‘vim’, ‘xfonts-75dpi’, ‘xfonts-base’, ‘zlib1g-dev’, ‘apt-transport-https’, ‘libsasl2-dev’, ‘libldap2-dev’, ‘libcups2-dev’, ‘pv’]) =>




end of message

PLAY RECAP *************************************************************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 413, in
install_bench(args)
File “install.py”, line 135, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 327, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 190, 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

I really appreciate your help.

Thanks a lot

Your install script is outdated.

Contact the author to correct this.

Alternatively, install aptitide and try again
sudo apt install aptitude

I have installed aptitude and re tried, new error message shown

fatal: [localhost]: FAILED! => {
    "changed": true,
    "cmd": "localectl",
    "delta": "0:00:00.495522",
    "end": "2019-09-07 11:34:02.757089",
    "invocation": {
        "module_args": {
            "_raw_params": "localectl",
            "_uses_shell": true,
            "argv": null,
            "chdir": null,
            "creates": null,
            "executable": null,
            "removes": null,
            "stdin": null,
            "stdin_add_newline": true,
            "strip_empty_ends": true,
            "warn": true
        }
    },
    "msg": "non-zero return code",
    "rc": 1,
    "start": "2019-09-07 11:34:02.261567",
    "stderr": "Failed to create bus connection: No such file or directory",
    "stderr_lines": [
        "Failed to create bus connection: No such file or directory"
    ],
    "stdout": "",
    "stdout_lines": []
}

PLAY RECAP *************************************************************************************************************
localhost                  : ok=5    changed=1    unreachable=0    failed=1    skipped=3    rescued=0    ignored=0

Traceback (most recent call last):
  File "install.py", line 413, in <module>
    install_bench(args)
  File "install.py", line 135, in install_bench
    run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 327, in run_playbook
    success = subprocess.check_call(args, cwd=os.path.join(cwd, 'playbooks'))
  File "/usr/lib/python2.7/subprocess.py", line 190, 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

Thx for your support
Nofal

I think it’s easier to use the virtual machine method

https://erpnext.org/download

1 Like

I have followed steps
[GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps](http://manual install)
and this command give an error any idea?

erpnext@LAPTOP-5F23F7J8:/$ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
Executing: /tmp/apt-key-gpghome.FwzdLzK8pE/gpg.1.sh --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
gpg: connecting dirmngr at '/tmp/apt-key-gpghome.FwzdLzK8pE/S.dirmngr' failed: IPC connect call failed
gpg: keyserver receive failed: No dirmngr

I think you’re getting stuck with multiple scenerio.

I would recommend you to first try to install ERPNext on a fresh Ubuntu installed directly on a VM or a pc. Once that is successful then try the same on Ubuntu with WSL.

I have shared a video of Gary’s tutorial on installing Ubuntu on Windows 10 with WSL, it is still experimental and don’t not have most of the Libraries installed by default so maybe you will have to install them manually. Once you have working Ubuntu with WSL then try the same method of installing ERPnext which you tried on fresh Ubuntu on VM

1 Like

I have a book named [ERPNEXT INSTALLATION GUIDE]
slogan “FROM EXCITING TO DISAPPOINTING”:smile:

Using the virtual machine method is not helping anyone to solve this issue.

I am getting the same error. No solution so far.

Hi,
I have published a note, have you tried?

[Tutorial] How To install ERPNext V12 on windows 10 home / Pro WSL ubuntu 18.04LTS

1 Like