Error while installing erpnext using install script

Hi everyone
a strange error occurs while I install erpnext using easy way, I didn’t face to such a problem before, anyone knows about it?
please help
I run
apt-get install python-minimal
apt-get install build-essential python-setuptools
wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py

but command python install.py --develop --user frappe give the bellow error

TASK [mariadb : Install MariaDB] **************************************************************************************************************************
failed: [localhost] (item=[u'mariadb-server', u'mariadb-client', u'libmariadbclient18']) => {"cache_update_time": 1537767388, "cache_updated": false, "changed": false, "item": ["mariadb-server", "mariadb-client", "libmariadbclient18"], "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"     install 'mariadb-server' 'mariadb-client' 'libmariadbclient18'' failed: No apport report written because the error message indicates its a followup error from a previous failure.\nE: Sub-process /usr/bin/dpkg returned an error code (1)\n", "rc": 100, "stderr": "No apport report written because the error message indicates its a followup error from a previous failure.\nE: Sub-process /usr/bin/dpkg returned an error code (1)\n", "stderr_lines": ["No apport report written because the error message indicates its a followup error from a previous failure.", "E: Sub-process /usr/bin/dpkg returned an error code (1)"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following additional packages will be installed:\n  galera-3 libaio1 libcgi-fast-perl libcgi-pm-perl libdbd-mysql-perl\n  libdbi-perl libencode-locale-perl libfcgi-perl libhtml-parser-perl\n  libhtml-tagset-perl libhtml-template-perl libhttp-date-perl\n  libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libmariadb3\n  libmysqlclient20 libterm-readkey-perl libtimedate-perl liburi-perl\n  mariadb-client-10.2 mariadb-client-core-10.2 mariadb-common\n  mariadb-server-10.2 mariadb-server-core-10.2 mysql-common socat\nSuggested packages:\n  libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl\n  libdata-dump-perl libipc-sharedcache-perl libwww-perl mailx mariadb-test\n  tinyca\nThe following NEW packages will be installed:\n  galera-3 libaio1 libcgi-fast-perl libcgi-pm-perl libdbd-mysql-perl\n  libdbi-perl libencode-locale-perl libfcgi-perl libhtml-parser-perl\n  libhtml-tagset-perl libhtml-template-perl libhttp-date-perl\n  libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libmariadb3\n  libmariadbclient18 libmysqlclient20 libterm-readkey-perl libtimedate-perl\n  liburi-perl mariadb-client mariadb-client-10.2 mariadb-client-core-10.2\n  mariadb-common mariadb-server mariadb-server-10.2 mariadb-server-core-10.2\n  mysql-common socat\nPreconfiguring packages ...\n0 upgraded, 30 newly installed, 0 to remove and 1 not upgraded.\nNeed to get 0 B/22.1 MB of archives.\nAfter this operation, 187 MB of additional disk space will be used.\nSelecting previously unselected package mysql-common.\r\n(Reading database ... \r(Reading database ... 5%\r(Reading database ... 10%\r(Reading database ... 15%\r(Reading database ... 20%\r(Reading database ... 25%\r(Reading database ... 30%\r(Reading database ... 35%\r(Reading database ... 40%\r(Reading database ... 45%\r(Reading database ... 50%\r(Reading database ... 55%\r(Reading database ... 60%\r(Reading database ... 65%\r(Reading database ... 70%\r(Reading database ... 75%\r(Reading database ... 80%\r(Reading database ... 85%\r(Reading database ... 90%\r(Reading database ... 95%\r(Reading database ... 100%\r(Reading database ... 108575 files and directories currently installed.)\r\nPreparing to unpack .../mysql-common_10.2.17+maria~xenial_all.deb ...\r\nUnpacking mysql-common (10.2.17+maria~xenial) ...\r\nSelecting previously unselected package mariadb-common.\r\nPreparing to unpack .../mariadb-common_10.2.17+maria~xenial_all.deb ...\r\nUnpacking mariadb-common (10.2.17+maria~xenial) ...\r\nSelecting previously unselected package galera-3.\r\nPreparing to unpack .../galera-3_25.3.23-xenial_amd64.deb ...\r\nUnpacking galera-3 (25.3.23-xenial) ...\r\nSelecting previously unselected package libdbi-perl.\r\nPreparing to unpack .../libdbi-perl_1.634-1build1_amd64.deb ...\r\nUnpacking libdbi-perl (1.634-1build1) ...\r\nSelecting previously unselected package mariadb-client-core-10.2.\r\nPreparing to unpack .../mariadb-client-core-10.2_10.2.17+maria~xenial_amd64.deb ...\r\nUnpacking mariadb-client-core-10.2 (10.2.17+maria~xenial) ...\r\nSelecting previously unselected package mariadb-client-10.2.\r\nPreparing to unpack .../mariadb-client-10.2_10.2.17+maria~xenial_amd64.deb ...\r\nUnpacking mariadb-client-10.2 (10.2.17+maria~xenial) ...\r\nSelecting previously unselected package libaio1:amd64.\r\nPreparing to unpack .../libaio1_0.3.110-2_amd64.deb ...\r\nUnpacking libaio1:amd64 (0.3.110-2) ...\r\nSelecting previously unselected package mariadb-server-core-10.2.\r\nPreparing to unpack .../mariadb-server-core-10.2_10.2.17+maria~xenial_amd64.deb ...\r\nUnpacking mariadb-server-core-10.2 (10.2.17+maria~xenial) ...\r\nSelecting previously unselected package socat.\r\nPreparing to unpack .../socat_1.7.3.1-1_amd64.deb ...\r\nUnpacking socat (1.7.3.1-1) ...\r\nProcessing triggers for man-db (2.7.5-1) ...\r\nProcessing triggers for libc-bin (2.23-0ubuntu10) ...\r\nSetting up mysql-common (10.2.17+maria~xenial) ...\r\nSetting up mariadb-common (10.2.17+maria~xenial) ...\r\nSelecting previously unselected package mariadb-server-10.2.\r\n(Reading database ... \r(Reading database ... 5%\r(Reading database ... 10%\r(Reading database ... 15%\r(Reading database ... 20%\r(Reading database ... 25%\r(Reading database ... 30%\r(Reading database ... 35%\r(Reading database ... 40%\r(Reading database ... 45%\r(Reading database ... 50%\r(Reading database ... 55%\r(Reading database ... 60%\r(Reading database ... 65%\r(Reading database ... 70%\r(Reading database ... 75%\r(Reading database ... 80%\r(Reading database ... 85%\r(Reading database ... 90%\r(Reading database ... 95%\r(Reading database ... 100%\r(Reading database ... 108928 files and directories currently installed.)\r\nPreparing to unpack .../mariadb-server-10.2_10.2.17+maria~xenial_amd64.deb ...\r\n/var/lib/mysql: found previous version 10.2\r\nUnpacking mariadb-server-10.2 (10.2.17+maria~xenial) ...\r\nSelecting previously unselected package libhtml-tagset-perl.\r\nPreparing to unpack .../libhtml-tagset-perl_3.20-2_all.deb ...\r\nUnpacking libhtml-tagset-perl (3.20-2) ...\r\nSelecting previously unselected package liburi-perl.\r\nPreparing to unpack .../liburi-perl_1.71-1_all.deb ...\r\nUnpacking liburi-perl (1.71-1) ...\r\nSelecting previously unselected package libhtml-parser-perl.\r\nPreparing to unpack .../libhtml-parser-perl_3.72-1_amd64.deb ...\r\nUnpacking libhtml-parser-perl (3.72-1) ...\r\nSelecting previously unselected package libcgi-pm-perl.\r\nPreparing to unpack .../libcgi-pm-perl_4.26-1_all.deb ...\r\nUnpacking libcgi-pm-perl (4.26-1) ...\r\nSelecting previously unselected package libfcgi-perl.\r\nPreparing to unpack .../libfcgi-perl_0.77-1build1_amd64.deb ...\r\nUnpacking libfcgi-perl (0.77-1build1) ...\r\nSelecting previously unselected package libcgi-fast-perl.\r\nPreparing to unpack .../libcgi-fast-perl_1%3a2.10-1_all.deb ...\r\nUnpacking libcgi-fast-perl (1:2.10-1) ...\r\nSelecting previously unselected package libmysqlclient20:amd64.\r\nPreparing to unpack .../libmysqlclient20_5.7.23-0ubuntu0.16.04.1_amd64.deb ...\r\nUnpacking libmysqlclient20:amd64 (5.7.23-0ubuntu0.16.04.1) ...\r\nSelecting previously unselected package libdbd-mysql-perl.\r\nPreparing to unpack .../libdbd-mysql-perl_4.033-1ubuntu0.1_amd64.deb ...\r\nUnpacking libdbd-mysql-perl (4.033-1ubuntu0.1) ...\r\nSelecting previously unselected package libencode-locale-perl.\r\nPreparing to unpack .../libencode-locale-perl_1.05-1_all.deb ...\r\nUnpacking libencode-locale-perl (1.05-1) ...\r\nSelecting previously unselected package libhtml-template-perl.\r\nPreparing to unpack .../libhtml-template-perl_2.95-2_all.deb ...\r\nUnpacking libhtml-template-perl (2.95-2) ...\r\nSelecting previously unselected package libtimedate-perl.\r\nPreparing to unpack .../libtimedate-perl_2.3000-2_all.deb ...\r\nUnpacking libtimedate-perl (2.3000-2) ...\r\nSelecting previously unselected package libhttp-date-perl.\r\nPreparing to unpack .../libhttp-date-perl_6.02-1_all.deb ...\r\nUnpacking libhttp-date-perl (6.02-1) ...\r\nSelecting previously unselected package libio-html-perl.\r\nPreparing to unpack .../libio-html-perl_1.001-1_all.deb ...\r\nUnpacking libio-html-perl (1.001-1) ...\r\nSelecting previously unselected package liblwp-mediatypes-perl.\r\nPreparing to unpack .../liblwp-mediatypes-perl_6.02-1_all.deb ...\r\nUnpacking liblwp-mediatypes-perl (6.02-1) ...\r\nSelecting previously unselected package libhttp-message-perl.\r\nPreparing to unpack .../libhttp-message-perl_6.11-1_all.deb ...\r\nUnpacking libhttp-message-perl (6.11-1) ...\r\nSelecting previously unselected package libmariadb3.\r\nPreparing to unpack .../libmariadb3_10.2.17+maria~xenial_amd64.deb ...\r\nUnpacking libmariadb3 (10.2.17+maria~xenial) ...\r\nReplacing files in old package libmysqlclient20:amd64 (5.7.23-0ubuntu0.16.04.1) ...\r\nSelecting previously unselected package libmariadbclient18.\r\nPreparing to unpack .../libmariadbclient18_10.2.17+maria~xenial_amd64.deb ...\r\nUnpacking libmariadbclient18 (10.2.17+maria~xenial) ...\r\nSelecting previously unselected package libterm-readkey-perl.\r\nPreparing to unpack .../libterm-readkey-perl_2.33-1build1_amd64.deb ...\r\nUnpacking libterm-readkey-perl (2.33-1build1) mariadb-client (10.2.17+maria~xenial) ...", "dpkg: dependency problems prevent configuration of mariadb-server:", " mariadb-server depends on mariadb-server-10.2 (>= 10.2.17+maria~xenial); however:", "  Package mariadb-server-10.2 is not configured yet.", "", "dpkg: error processing package mariadb-server (--configure):", " dependency problems - leaving unconfigured", "Processing triggers for libc-bin (2.23-0ubuntu10) ...", "Processing triggers for systemd (229-4ubuntu21.4) ...", "Processing triggers for ureadahead (0.100.0-19) ...", "Errors were encountered while processing:", " mariadb-server-10.2", " mariadb-server"]}
        to retry, use: --limit @/tmp/.bench/playbooks/site.retry

PLAY RECAP 
localhost                  : ok=12   changed=4    unreachable=0    failed=1

Traceback (most recent call last):
  File "install.py", line 420, in <module>
    install_bench(args)
  File "install.py", line 122, in install_bench
    run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 338, 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', 'site.yml', '-e', '@/tmp/extra_vars.json', '--become', '--become-user=frappe']' returned non-zero exit status 2

This can be solved like so:

sudo apt-get remove --purge mariadb-server mariadb-client 
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get install mariadb-server mariadb-client

Source: https://mariadb.com/kb/en/library/mariadb-installation-dependancy-problems-and-failed-to-start-service/

1 Like

Dear @snv thanks for reply
I get this error when I remove maria-db

bench@MMERP07:~$ sudo apt-get remove --purge mariadb-server mariadb-client
[sudo] password for bench:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  galera-3 libaio1 libcgi-fast-perl libcgi-pm-perl libdbd-mysql-perl libdbi-perl libencode-locale-perl libfcgi-perl libhtml-parser-perl
  libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libmysqlclient20
  libterm-readkey-perl libtimedate-perl liburi-perl mariadb-client-10.2 mariadb-client-core-10.2 mariadb-server-10.2 mariadb-server-core-10.2 socat
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  mariadb-client* mariadb-server*
0 upgraded, 0 newly installed, 2 to remove and 1 not upgraded.
2 not fully installed or removed.
After this operation, 20.5 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 109373 files and directories currently installed.)
Removing mariadb-server (10.2.17+maria~xenial) ...
Removing mariadb-client (10.2.17+maria~xenial) ...
Setting up mariadb-server-10.2 (10.2.17+maria~xenial) ...
2018-09-24 10:42:10 140703872493760 [Note] /usr/sbin/mysqld (mysqld 10.2.17-MariaDB-10.2.17+maria~xenial) starting as process 16928 ...
2018-09-24 10:42:10 140703872493760 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-09-24 10:42:10 140703872493760 [Note] InnoDB: Uses event mutexes
2018-09-24 10:42:10 140703872493760 [Note] InnoDB: Compressed tables use zlib 1.2.8
2018-09-24 10:42:10 140703872493760 [Note] InnoDB: Using Linux native AIO
2018-09-24 10:42:10 140703872493760 [Note] InnoDB: Number of pools: 1
2018-09-24 10:42:10 140703872493760 [Note] InnoDB: Using SSE2 crc32 instructions
2018-09-24 10:42:10 140703872493760 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
2018-09-24 10:42:10 140703872493760 [Note] InnoDB: Completed initialization of buffer pool
2018-09-24 10:42:10 140702932305664 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-09-24 10:42:10 140703872493760 [Note] InnoDB: Highest supported file format is Barracuda.
2018-09-24 10:42:10 140703872493760 [Note] InnoDB: 128 out of 128 rollback segments are active.
2018-09-24 10:42:10 140703872493760 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-09-24 10:42:10 140703872493760 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-09-24 10:42:10 140703872493760 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2018-09-24 10:42:10 140703872493760 [Note] InnoDB: Waiting for purge to start
2018-09-24 10:42:10 140703872493760 [Note] InnoDB: 5.7.23 started; log sequence number 1620177
2018-09-24 10:42:10 140703872493760 [Note] Plugin 'FEEDBACK' is disabled.
2018-09-24 10:42:10 140702923912960 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2018-09-24 10:42:10 140702923912960 [Note] InnoDB: Buffer pool(s) load completed at 180924 10:42:10
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mariadb.service - MariaDB 10.2.17 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: failed (Result: exit-code) since Mon 2018-09-24 10:42:17 +0430; 13ms ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 17228 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 17071 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 17065 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 17060 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
 Main PID: 17228 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

Sep 24 10:42:15 MMERP07 mysqld[17228]: 2018-09-24 10:42:15 140172406540032 [Note] InnoDB: Buffer pool(s) load completed at 180924 10:42:15
Sep 24 10:42:15 MMERP07 mysqld[17228]: 2018-09-24 10:42:15 140173583292608 [ERROR] mysqld: File '/var/lib/mysql/mysql-bin.000010' not found (Er...rectory")
Sep 24 10:42:15 MMERP07 mysqld[17228]: 2018-09-24 10:42:15 140173583292608 [ERROR] Failed to open log (file '/var/lib/mysql/mysql-bin.000010', errno 2)
Sep 24 10:42:15 MMERP07 mysqld[17228]: 2018-09-24 10:42:15 140173583292608 [ERROR] Could not open log file
Sep 24 10:42:15 MMERP07 mysqld[17228]: 2018-09-24 10:42:15 140173583292608 [ERROR] Can't init tc log
Sep 24 10:42:15 MMERP07 mysqld[17228]: 2018-09-24 10:42:15 140173583292608 [ERROR] Aborting
Sep 24 10:42:17 MMERP07 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Sep 24 10:42:17 MMERP07 systemd[1]: Failed to start MariaDB 10.2.17 database server.
Sep 24 10:42:17 MMERP07 systemd[1]: mariadb.service: Unit entered failed state.
Sep 24 10:42:17 MMERP07 systemd[1]: mariadb.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package mariadb-server-10.2 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mariadb-server-10.2
E: Sub-process /usr/bin/dpkg returned an error code (1)

This might help: