ERPNext Installation on Ubuntu 16


I’m facing following issue while using the deployment script …

prashanth@ubuntu:~/ERPNext$ sudo bash --setup-production
Installing for Ubuntu xenial amd64
In case you encounter an error, you can post on

Adding ubuntu mariadb repo
Installing packages for Ubuntu. This might take time…
Installing wkhtmltopdf
–2016-07-16 19:32:38--
Resolving (…
Connecting to (||:80… connected.
HTTP request sent, awaiting response… 404 Not Found
2016-07-16 19:32:38 ERROR 404: Not Found.

Would be great if someone can provide a solution.


1 Like

Also added --allow-unauthenticated flag to few of the apt command inside so that script did’t fail

Hi, the old script doesn’t work properly on 16.04. Use the new Beta script : GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps

Make sure to start afresh.


As suggested, i did a clean setup with the beta script on a fresh virtual machine, script progressed properly till MySQL configuration, i’m getting following error …

failed: [localhost] (item=localhost) => {“failed”: true, “item”: “localhost”, “msg”: “unable to connect to database, check login_user and login_password are correct or /home/prashanth/.my.cnf has the credentials. Exception message: (1045, "Access denied for user ‘root’@‘localhost’ (using password: NO)")”}
failed: [localhost] (item= => {“failed”: true, “item”: “”, “msg”: “unable to connect to database, check login_user and login_password are correct or /home/prashanth/.my.cnf has the credentials. Exception message: (1045, "Access denied for user ‘root’@‘localhost’ (using password: NO)")”}
failed: [localhost] (item=::1) => {“failed”: true, “item”: “::1”, “msg”: “unable to connect to database, check login_user and login_password are correct or /home/prashanth/.my.cnf has the credentials. Exception message: (1045, "Access denied for user ‘root’@‘localhost’ (using password: NO)")”}

Though this error is initially ignored, but during the bench setup script is throwing error and exiting.


Following the final error …

TASK [Install erpnext app] *****************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“bench”, “–site”, “site1.local”, “install-app”, “erpnext”], “delta”: “0:00:01.646800”, “end”: “2016-07-19 03:40:05.464523”, “failed”: true, “rc”: 1, “start”: “2016-07-19 03:40:03.817723”, “stderr”: “Traceback (most recent call last):\n File "/usr/lib/python2.7/", line 174, in _run_module_as_main\n "main", fname, loader, pkg_name)\n File "/usr/lib/python2.7/", line 72, in _run_code\n exec code in run_globals\n File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/", line 79, in \n main()\n File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/", line 16, in main\n click.Group(commands=commands)(prog_name=‘bench’)\n File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 716, in call\n return self.main(*args, **kwargs)\n File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 696, in main\n rv = self.invoke(ctx)\n File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 1060, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 1060, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 889, in invoke\n return ctx.invoke(self.callback, **ctx.params)\n File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 534, in invoke\n return callback(*args, **kwargs)\n File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/", line 17, in new_func\n return f(get_current_context(), *args, **kwargs)\n File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 29, in _func\n ret = f(frappe._dict(ctx.obj), *args, **kwargs)\n File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 163, in install_app\n _install_app(app, verbose=context.verbose)\n File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 93, in install_app\n frappe.clear_cache()\n File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 425, in clear_cache\n for fn in frappe.get_hooks("clear_cache"):\n File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 721, in get_hooks\n hooks = _dict(cache().get_value("app_hooks", load_app_hooks))\n File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/", line 68, in get_value\n val = generator()\n File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 689, in load_app_hooks\n for app in [app_name] if app_name else get_installed_apps(sort=True):\n File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 669, in get_installed_apps\n installed = json.loads(db.get_global("installed_apps") or "[]")\n File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 642, in get_global\n return self.get_default(key, user)\n File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 654, in get_default\n d = self.get_defaults(key, parent)\n File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 660, in get_defaults\n defaults = frappe.defaults.get_defaults(parent)\n File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 72, in get_defaults\n globald = get_defaults_for()\n File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 179, in get_defaults_for\n where parent = %s order by creation""", (parent,), as_dict=1)\n File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 106, in sql\n self.connect()\n File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 52, in connect\n use_unicode=True, charset=‘utf8’)\n File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/", line 81, in Connect\n return Connection(*args, **kwargs)\n File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/", line 193, in init\n super(Connection, self).init(*args, **kwargs2)\n_mysql_exceptions.OperationalError: (1045, "Access denied for user ‘1bd3e0294d’@‘localhost’ (using password: YES)")”, “stdout”: “”, “stdout_lines”: [], “warnings”: []}

When i tried connecting to MySQL using “mysql -u root -p” was able to connect but if i use “mysql -u ‘root’@‘localhost’ -p” getting access denied error, just thought this might help is identifying the issue :slight_smile:

Did you run the beta installer on a Fresh System? Because I think the changes the old installer made are clashing with the new one.

Related, you can grab a ERPNext VM off the download page, it requires no setup whatsoever.

Yes, it is a new installation (Created new VM),

For the second point, i understand the VM Image, problem is i don’t think it will be useful when i have to install the ERPNext on a Production Server, hence i’m practicing on VM’s currently.

In any case do let me know which Flavor and Version of Linux do support flawless installation procedure i shall use the same.


Ubuntu 14.04 through 16.04 work just perfectly. Maybe try installation on a Digital Ocean droplet?

Looking back at your post, I’m unsure at what you mean here? You only need to run the Beta installer script, and nothing else.

Following errors found during run of the beta script, i believe it might be a issue completely isolated to MySQL, if you see my previous post - i was able to login to MySQL by using “mysql root -p” but not able to login if i use “mysql root@localhost -p” and the error thrown looks like “ERROR 1045 (28000): Access denied for user ‘root@localhost’@‘localhost’ (using password: YES)”.

I’m new to MySQL, if you observe the error it is taking root@localhost as user name instead of taking root as a user name.

Appreciate your help

Was able to resolve some of the issues by creating …

  1. .my.cnf @ home dir
  2. Updating site_config.json

But still i’m facing issues at [Install erpnext app] stage, root cause of this issue seems to be …

File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/", line 36, in defaulterrorhandler\n raise errorclass, errorvalue\n_mysql_exceptions.OperationalError: (1046, ‘No database selected’)", “stdout”: “”, “stdout_lines”: [], “warnings”: []}

Let me know in case of any suggestions …