Hello friends,
This is my first post on this forum.
I was struggling to install ERPNEXT with easy install method. I almost spend 3-4 days to know why it is not working finally with lots of tweaks and turns i managed to install it. (Thanks to the lockdown i was able to spare the time to troubleshoot the issue in detail.)
-
Fresh installation of Ubuntu 20.04
-
Creations of user with sudo rights.
sudo adduser *Your_USERNAME*
sudo usermod -aG sudo *Your_USERNAME*
- Use this cmd to get your install.py
wget https://raw.githubusercontent.com/frappe/bench/develop/install.py
- Updating the install.py in order to support Ubuntu 20.04, by default the script is made for Ubuntu <=18.04.
By the way with ubuntu 20.04 python 3.8 comes installed. And hence the platform.dist() is no more supported by the python3.8.
To help the installation we have to do the following modifications in the install.py,
On line 81 : Change 'ubuntuā: [14, 15, 16, 18, 19], to āubuntuā: [14, 15, 16, 18, 19, 20],
On line 100 : Change current_dist = platform.dist() to current_dist = [āUbuntuā, ā20.04ā]
This will get you started with installation.
- Always install it with --verbose on to know where the problem is occurring.
The famous āreturned non-zero exit status 1ā error will bother you but donāt worry --verbose will tell you why this is not working.
In my case I used following cmd : sudo python3 install.py --production --user Your_USERNAME --mariadb-version 10.5 --verbose
Note mariadb version 10.5 was used since default 10.2 is not supported by ubuntu 20.04
Lot of people is having this error but nobody was able to knows where does this error come from. Thanks to --verbose it will help troubleshooting.
In my case i had to tweak the following files to make it through.
Note : Every time the installation fails solve the error and rerun the sudo python3 install.py --production --user Your_USERNAME --mariadb-version 10.5 --verbose
Most of the errors were coming from playbooks
- If you get libssl error.
Since libssl1.0-dev is not supported by Ubuntu 20.04 you need to do following.
go to /tmp/ .bench/playbooks/roles/common/tasks/ubuntu.yml
sudo nano ubuntu.yml
Line 36 : Change from - libssl1.0-dev to - libssl1.1
Again libssl1.0 does not support ubuntu 20.04. Ubuntu 20.04 comes installed with libssl1.1, if not install it.
- If you get Nodejs error, āError mentioning no supported version found for the distributionā
Nodejs version 12.x works with ubuntu20.04. We need to fix playbook for this.
go to /tmp/ .bench/playbooks/roles/nodejs/tasks/ debian_family.yml
sudo nano debian_family.yml
Line 6 : Change from - ācurl --silent --location https://deb.nodesource.com/setup_{{ node_version }}.x | bash -ā
TO ācurl --silent --location https://deb.nodesource.com/setup_12.x | bash -ā
Line 8 : Change from - name: Install nodejs {{ node_version }}
TO
- name: Install nodejs 12
--------------------------------------------//--------------------------------------------------------------------
go to /tmp/ .bench/playbooks/roles/nodejs/tasks/ redhat_family.yml
sudo nano redhat_family.yml
Line 6 : Change from ācurl --silent --location https://rpm.nodesource.com/setup_{{ node_version }}.x | sudo bash -ā
TO ācurl --silent --location https://rpm.nodesource.com/setup_12.x | sudo bash -ā
Line 8 : Change from - name: Install node v{{ node_version }}
TO - name: Install node v12
- If you get wkhtmltopdf error.
Then go to https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.focal_amd64.deb
download the wkhtmltox_0.12.5-1.focal_amd64.deb file rename it to wkhtmltox.deb
And the copy or move this file to /tmp folder.
I am not a professional coder so any mistakes or wrong way of doing things in above method should be highlighted and your feedback is appreciated.
- If you face
ModuleNotFoundError: No module named āerpnext
.
Follow this https://medium.com/@binodpaneru23/setting-up-erpnext-in-mac-os-c475466f5403
Based on this doc I used
frappe-bench/env/bin/pip3 install -U -e ./apps/erpnext
Thanks @arun992 for steps 5 and 6
- if you get stuck with
Cython is required to compile pandas from a development branch.
error.
Check this post [Bench installation of erpnext fails on pandas setup if numpy>=1.19.0 Ā· Issue #22424 Ā· frappe/erpnext Ā· GitHub]
Based on this doc use the following commands:
frappe-bench/env/bin/pip3 install pandas==0.24.2
frappe-bench/env/bin/pip install numpy==1.18.5
After this use
frappe-bench/env/bin/pip3 install -U -e ./apps/erpnext
Oncef inished the erpnext installationcontinue with the command
sudo frappe-bench/env/bin/python3 temp --production --user frappe --mariadb-version 10.5 --verbose
Hope this will help people to enjoy the sweet fruit of ERPNEXT.