ERPNext Conference 2019* ERPNext.com Blog

How to install ERPNext on ubuntu 18.04 WSL?


#1

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


Error Installing 12.1.0 E: Unable to locate package libssl1.0-dev
Why setup is stuck?
#2

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


#3

you can try this


#4

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


#5

#6

Your install script is outdated.

Contact the author to correct this.

Alternatively, install aptitide and try again
sudo apt install aptitude


#7

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


#8

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

https://erpnext.org/download


#9

I have followed steps
[https://github.com/frappe/bench](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

#10

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