Install Error on Ubuntu 16.04

@SOLOSOFT Seems like error is due to dependencies specially on Ubuntu 16.04. I think best way to resolve the issue would be:

Step 1: Remove frappe folder (from /home) , .bench (from /tmp), mysql & mariadb completely from server.

To remove any trace of mariadb installed through apt-get:
(Note: Backup your db if required)

sudo service mysql stop
sudo apt-get --purge remove "mysql*"
sudo rm -rf /etc/mysql/ 

and it is all gone. Including databases and any configuration file.

Step 2: Setup the system apt repo and install mariadb (10+ as required by ERPNext)

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://mirror.jmu.edu/pub/mariadb/repo/10.1/ubuntu xenial main'

sudo apt update -y
sudo apt install -y mariadb-server

Step 3: Secure your mariadb installation

sudo /usr/bin/mysql_secure_installation

During the interactive process, answer questions one by one as follows:

Enter current password for root (enter for none):
Set root password? [Y/n]: Y
New password:
Re-enter new password:
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y
Note: Be sure to replace with your own MariaDB root password.

Step 4: Install nodejs (Due to legecy nodejs dependencies on Ubuntu 16.04, ERPNext setup trigger a compilation error)

sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
sudo apt-get update && sudo apt-get install nodejs-legacy

Install redis server and wkhtmltopdf by referring this link:

Redis server: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04

Wkhtmltopdf: sudo apt-get install wkhtmltopdf
(Note: this should install the latest version with QT)

Step 5: Follow manual installation as non-root user
(Note: This will install ERPNext which can be checked by http://ipadress:8000

git clone https://github.com/frappe/bench bench-repo
sudo pip install -e bench-repo
bench init frappe-bench && cd frappe-bench
bench new-site site1.local 
bench get-app erpnext https://github.com/frappe/erpnext
bench --site site1.local install-app erpnext

Step 6: Setup production

sudo bench setup production {{ username_goes_here }}

Thats it! Now you can use great ERPNext. :slight_smile: Spread the great work by ERPNext community.

2 Likes