Production installation on fresh Server Ubuntu 16.04 LTS Failed

Hello everyone. I am installing frappe and ERPNext on a newly installed, self hosted, Ubuntu server 16.04 LTS but received this failure:

TASK [apt-get install] *********************************************************
failed: [localhost] (item=[u’mariadb-server’, u’mariadb-client’, u’mariadb-common’, u’libmariadbclient-dev’]) => {“cache_update_time”: 1495975355, “cache_updated”: true, “failed”: true, “item”: [“mariadb-server”, “mariadb-client”, “mariadb-common”, “libmariadbclient-dev”], “msg”: “‘/usr/bin/apt-get -y -o "Dpkg::Options::=–force-confdef" -o "Dpkg::Options::=–force-confold" install ‘mariadb-server’ ‘mariadb-client’ ‘mariadb-common’ ‘libmariadbclient-dev’’ failed: E: Unable to correct problems, you have held broken packages.\n”, “stderr”: “E: Unable to correct problems, you have held broken packages.\n”, “stdout”: “Reading package lists…\nBuilding dependency tree…\nReading state information…\nSome packages could not be installed. This may mean that you have\nrequested an impossible situation or if you are using the unstable\ndistribution that some required packages have not yet been created\nor been moved out of Incoming.\nThe following information may help to resolve the situation:\n\nThe following packages have unmet dependencies:\n mariadb-server : Depends: mariadb-server-10.1 (= 10.1.23+maria-1~xenial) but it is not going to be installed\n”, “stdout_lines”: [“Reading package lists…”, “Building dependency tree…”, “Reading state information…”, “Some packages could not be installed. This may mean that you have”, “requested an impossible situation or if you are using the unstable”, “distribution that some required packages have not yet been created”, “or been moved out of Incoming.”, “The following information may help to resolve the situation:”, “”, “The following packages have unmet dependencies:”, " mariadb-server : Depends: mariadb-server-10.1 (= 10.1.23+maria-1~xenial) but it is not going to be installed"]}
to retry, use: --limit @production/install.retry

PLAY RECAP *********************************************************************
localhost : ok=13 changed=8 unreachable=0 failed=1

Traceback (most recent call last):
File “install.py”, line 355, 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 301, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 541, 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

Any idea guys? Thanks in advance.

I only installed via the easy install method on an ubuntu 1604 server last night it worked fine for me.

Hi @Julian_Robbins . Thanks a lot for you response. I am installing using the easy install too. I am thinking that I might have installed something during OS installation that causes the dependency error. I have selected these:

Any thoughts guys?

Hi @funtasho! It seems that you have error when installing MariaDB. Can you check if there is mysql server already installed?

Hello @creamdory . Thank you for your response. Yes. I have confirmed that SQL Server is installed in my server. How do I proceed?

Try purging your SQL. See here. And run frappe installation again.

1 Like

Hello @creamdory! I tried your suggestion and I went through but later on got another error on nginx dependency issue. Any thoughts?

Tried purging Nginx and retried installation but still failing on the nginx dependency issue.

Please check if Apache2 is installed. If yes, try removing if you don’t intend to use @funtasho .

1 Like

Hello @creamdory! Yes Apache2 was installed and I have removed it as advised. I tried reinstalling again and it went through successfully. Many thanks for you help! Really appreciate it.

2 Likes