ERPNext Conference 2019* ERPNext.com Blog

ERPNext Installation Documentation


#1

I am having issues with your documentation:

The ERPNext Installation Guide that I found here:
https://frappe.github.io/erpnext/install.html

Tells me to install the Frappe Bench. So I go here:

I am on an up-to-date “blank server” running Ubuntu 14.04 with LXDE as a desktop in a Virtual Machine.

I follow the "Easy Setup: steps and do this:
wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
This looks ok: 2016-09-08 15:13:06 (156 KB/s) - ‘install.py’ saved [10340/10340]

Next I run this:
sudo python install.py --production

during installation I get several warnings that tell me: “You can upgrade to a newer version of Python to solve this”. Which I find odd.

I also get this:
Please enter mysql root password:
Re-enter mysql root password:
Please enter Administrator password:
Re-enter Administrator password:
[WARNING]: Host file not found: /etc/ansible/hosts

[WARNING]: provided hosts list is empty, only localhost is available

(None of which inspires confidence)

Finally it all falls down with this:
TASK [install pillow prerequisites for Ubuntu >= 14.04] ************************
changed: [localhost] => (item=[u’libtiff5-dev’, u’tcl8.6-dev’, u’tk8.6-dev’])

TASK [Get nodejs 6.x bash script] **********************************************
fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, “msg”: “Failed to validate the SSL certificate for deb.nodesource.com:443. Make sure your managed systems have a valid CA certificate installed. If the website serving the url uses SNI you need python >= 2.7.9 on your managed machine. You can use validate_certs=False if you do not need to confirm the server\s identity but this is unsafe and not recommended Paths checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, /etc/pki/tls/certs, /usr/share/ca-certificates/cacert.org, /etc/ansible”}

NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @production/install.retry

PLAY RECAP *********************************************************************
localhost : ok=6 changed=2 unreachable=0 failed=1

Traceback (most recent call last):
File “install.py”, line 342, in
install_bench(args)
File “install.py”, line 111, in install_bench
run_playbook(‘production/install.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 292, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 540, 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
mike@ubuntu:~$

So I clone another VM and try again. This time I start with this:
sudo su (and my password) thinking that it might be a permissions thing.

wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py

Which, once again, looks fine:
2016-09-08 15:45:13 (257 KB/s) - ‘install.py’ saved [10340/10340]

root@ubuntu:/home/mike# (<— see! I’m root!)

Next I do this again:
sudo python install.py --production

Once again, I get the Python upgrade warning, as well as the “hosts” warning after entering the passwords…

and this happens again:

TASK [install pillow prerequisites for Ubuntu >= 14.04] ************************
changed: [localhost] => (item=[u’libtiff5-dev’, u’tcl8.6-dev’, u’tk8.6-dev’])

TASK [Get nodejs 6.x bash script] **********************************************
fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, “msg”: “Failed to validate the SSL certificate for deb.nodesource.com:443. Make sure your managed systems have a valid CA certificate installed. If the website serving the url uses SNI you need python >= 2.7.9 on your managed machine. You can use validate_certs=False if you do not need to confirm the server\s identity but this is unsafe and not recommended Paths checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, /etc/pki/tls/certs, /usr/share/ca-certificates/cacert.org, /etc/ansible”}

NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @production/install.retry

PLAY RECAP *********************************************************************
localhost : ok=6 changed=2 unreachable=0 failed=1

Traceback (most recent call last):
File “install.py”, line 342, in
install_bench(args)
File “install.py”, line 111, in install_bench
run_playbook(‘production/install.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 292, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 540, 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
root@ubuntu:/home/mike#

So I’m stumped. And I haven’t even got to “bench setup” yet…

I have over 20 years experience as an ERP Consultant and have worked with various ERP systems over the years.
I totally embrace the Open Source concept, but I haven’t done much development since my early COBOL days. So, in lieu of development I’d like to offer my services as a Technical Writer to create “the Idiot’s Guide to Installing ERPNext” (so that even I can understand it) as my contribution.

So will somebody help me please? Once I’ve got it fully documented (using Ubuntu 14.04 and 16.04) I will take ownership and try to ensure that the document is kept current.

Regards,
Mike Stroud
midrandopensource@gmail.com


#2

You could try these steps I did with CentOS 7.

Installing ErpNext on CentOs 7 - Guide

I’ll be posting steps by using:

https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh

It seems to be the latest script to use in order to perform an installation.


Installation - Error - After Frappe, during ERP Next
#3

I am getting the same error in a fresh install


#4

@pmcimini @midrandopensource

This is an issue that is complete out of control of ERPNext and Frappe maintainers, as this happens during an attempt to install nodejs 6.x which happens from node servers, which fails to validate the certificates for some cosmic reasons :confused: :angry:

Only way to resolve is try to re-run the script or update your python > 2.7.9 before running the install script


#5

Ok… I’ve done as you suggested and it worked. But the website https://github.com/frappe/bench says: You may have to install Python 2.7 (eg on Ubuntu 16.04+) by running apt-get install python-minimal

and also says: This script requires Python2.7+ installed on your machine.

I started out with Python 2.7.6.

I noticed the installation script doing this:

Preparing to unpack …/libpython2.7-dev_2.7.12-1~trusty1_amd64.deb …
Unpacking libpython2.7-dev:amd64 (2.7.12-1~trusty1) …

So why didn’t it work if Python was being upgraded from within the script? And why doesn’t the website warn me to check my Python version? It seems to me that a lot of frustration could have been easily avoided.


#6

#This will work for you…

sudo add-apt-repository ppa:fkrull/deadsnakes-python2.7
sudo apt-get update
sudo apt-get upgrade

For development
sudo python install.py --develop

For production
sudo python install.py --production

If you’re logged in as root, use --user flag to create a user and install using that user
sudo python install.py --develop --user frappe


#7

ubuntu 16-04 here with python 2.7.11-1 (ran apt-get install python-minimal before running the install.py script

results into

“The repository ‘http://ppa.launchpad.net/fkrull/deadsnakes-python2.7/ubuntu xenial Release’ does not have a Release file.”

and then being stuck with the installation of ERPNext


#8

It works for me