Installing PXC 5.7 on Debian 9

Hello everyone. I’m trying to install PXC 5.7 on Debian 9 due to these docs https://www.percona.com/doc/percona-xtradb-cluster/LATEST/install/apt.html#apt
But I get this

apt-get install percona-xtradb-cluster-57
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
debsums iproute libatomic1 libdbd-mysql-perl libdbi-perl libdpkg-perl libev4 libfile-fnmatch-perl libmariadb3 libmariadbclient18 libmecab2 libnuma1 mariadb-common mysql-common percona-xtrabackup-24
percona-xtradb-cluster-client-5.7 percona-xtradb-cluster-common-5.7 percona-xtradb-cluster-server-5.7 psmisc qpress socat
Suggested packages:
libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl debian-keyring gcc | c-compiler tinyca netcat-openbsd pv
Recommended packages:
libfile-fcntllock-perl
The following NEW packages will be installed:
debsums iproute libatomic1 libdbd-mysql-perl libdbi-perl libdpkg-perl libev4 libfile-fnmatch-perl libmariadb3 libmariadbclient18 libmecab2 libnuma1 mariadb-common mysql-common percona-xtrabackup-24
percona-xtradb-cluster-57 percona-xtradb-cluster-client-5.7 percona-xtradb-cluster-common-5.7 percona-xtradb-cluster-server-5.7 psmisc qpress socat
0 upgraded, 22 newly installed, 0 to remove and 0 not upgraded.
Need to get 24.0 MB of archives.
After this operation, 188 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian stable/main amd64 libdpkg-perl all 1.18.25 [1,287 kB]
Get:2 http://mirror.23media.de/mariadb/repo/10.2/debian stretch/main i386 mysql-common all 10.2.17+maria~stretch [8,456 B]
Get:3 http://mirror.23media.de/mariadb/repo/10.2/debian stretch/main i386 mariadb-common all 10.2.17+maria~stretch [3,334 B]
Get:4 http://mirror.23media.de/mariadb/repo/10.2/debian stretch/main amd64 libmariadb3 amd64 10.2.17+maria~stretch [111 kB]
Get:5 http://deb.debian.org/debian stable/main amd64 libfile-fnmatch-perl amd64 0.02-2+b3 [10.3 kB]
Get:6 http://deb.debian.org/debian stable/main amd64 debsums all 2.2.2 [49.5 kB]
Get:7 http://deb.debian.org/debian stable/main amd64 libatomic1 amd64 6.3.0-18+deb9u1 [8,966 B]
Get:8 http://mirror.23media.de/mariadb/repo/10.2/debian stretch/main amd64 libmariadbclient18 amd64 10.2.17+maria~stretch [2,948 B]
Get:9 http://deb.debian.org/debian stable/main amd64 libdbi-perl amd64 1.636-1+b1 [766 kB]
Get:10 http://repo.percona.com/apt stretch/main amd64 percona-xtradb-cluster-common-5.7 amd64 5.7.22-29.26-1.stretch [7,184 B]
Get:11 http://deb.debian.org/debian stable/main amd64 libdbd-mysql-perl amd64 4.041-2 [114 kB]
Get:12 http://deb.debian.org/debian stable/main amd64 libmecab2 amd64 0.996-3.1 [256 kB]
Get:13 http://deb.debian.org/debian stable/main amd64 libnuma1 amd64 2.0.11-2.1 [33.3 kB]
Get:14 http://deb.debian.org/debian stable/main amd64 psmisc amd64 22.21-2.1+b2 [123 kB]
Get:15 http://repo.percona.com/apt stretch/main amd64 percona-xtradb-cluster-client-5.7 amd64 5.7.22-29.26-1.stretch [2,280 kB]
Get:16 http://deb.debian.org/debian stable/main amd64 libev4 amd64 1:4.22-1+b1 [38.2 kB]
Get:17 http://deb.debian.org/debian stable/main amd64 socat amd64 1.7.3.1-2+deb9u1 [353 kB]
Get:18 http://deb.debian.org/debian stable/main amd64 iproute all 1:4.9.0-1+deb9u1 [16.6 kB]
Get:19 http://repo.percona.com/apt stretch/main amd64 percona-xtrabackup-24 amd64 2.4.12-1.stretch [6,285 kB]
Get:20 http://repo.percona.com/apt stretch/main amd64 qpress amd64 11-1.stretch [33.3 kB]
Get:21 http://repo.percona.com/apt stretch/main amd64 percona-xtradb-cluster-server-5.7 amd64 5.7.22-29.26-1.stretch [12.2 MB]
Get:22 http://repo.percona.com/apt stretch/main amd64 percona-xtradb-cluster-57 amd64 5.7.22-29.26-1.stretch [4,606 B]
Fetched 24.0 MB in 3s (6,329 kB/s)
Preconfiguring packages …
Selecting previously unselected package mysql-common.
(Reading database … 45691 files and directories currently installed.)
Preparing to unpack …/mysql-common_10.2.17+maria~stretch_all.deb …
Unpacking mysql-common (10.2.17+maria~stretch) …
Selecting previously unselected package libdpkg-perl.
Preparing to unpack …/libdpkg-perl_1.18.25_all.deb …
Unpacking libdpkg-perl (1.18.25) …
Selecting previously unselected package libfile-fnmatch-perl.
Preparing to unpack …/libfile-fnmatch-perl_0.02-2+b3_amd64.deb …
Unpacking libfile-fnmatch-perl (0.02-2+b3) …
Selecting previously unselected package debsums.
Preparing to unpack …/archives/debsums_2.2.2_all.deb …
Unpacking debsums (2.2.2) …
Setting up mysql-common (10.2.17+maria~stretch) …
Setting up libdpkg-perl (1.18.25) …
Setting up libfile-fnmatch-perl (0.02-2+b3) …
Setting up debsums (2.2.2) …
Selecting previously unselected package percona-xtradb-cluster-common-5.7.
(Reading database … 45883 files and directories currently installed.)
Preparing to unpack …/00-percona-xtradb-cluster-common-5.7_5.7.22-29.26-1.stretch_amd64.deb …
Unpacking percona-xtradb-cluster-common-5.7 (5.7.22-29.26-1.stretch) …
Selecting previously unselected package libatomic1:amd64.
Preparing to unpack …/01-libatomic1_6.3.0-18+deb9u1_amd64.deb …
Unpacking libatomic1:amd64 (6.3.0-18+deb9u1) …
Selecting previously unselected package libdbi-perl.
Preparing to unpack …/02-libdbi-perl_1.636-1+b1_amd64.deb …
Unpacking libdbi-perl (1.636-1+b1) …
Selecting previously unselected package percona-xtradb-cluster-client-5.7.
Preparing to unpack …/03-percona-xtradb-cluster-client-5.7_5.7.22-29.26-1.stretch_amd64.deb …
Unpacking percona-xtradb-cluster-client-5.7 (5.7.22-29.26-1.stretch) …
Selecting previously unselected package mariadb-common.
Preparing to unpack …/04-mariadb-common_10.2.17+maria~stretch_all.deb …
Unpacking mariadb-common (10.2.17+maria~stretch) …
Selecting previously unselected package libmariadb3.
Preparing to unpack …/05-libmariadb3_10.2.17+maria~stretch_amd64.deb …
Unpacking libmariadb3 (10.2.17+maria~stretch) …
Selecting previously unselected package libmariadbclient18.
Preparing to unpack …/06-libmariadbclient18_10.2.17+maria~stretch_amd64.deb …
Unpacking libmariadbclient18 (10.2.17+maria~stretch) …
Selecting previously unselected package libdbd-mysql-perl.
Preparing to unpack …/07-libdbd-mysql-perl_4.041-2_amd64.deb …
Unpacking libdbd-mysql-perl (4.041-2) …
Selecting previously unselected package libmecab2:amd64.
Preparing to unpack …/08-libmecab2_0.996-3.1_amd64.deb …
Unpacking libmecab2:amd64 (0.996-3.1) …
Selecting previously unselected package libnuma1:amd64.
Preparing to unpack …/09-libnuma1_2.0.11-2.1_amd64.deb …
Unpacking libnuma1:amd64 (2.0.11-2.1) …
Selecting previously unselected package psmisc.
Preparing to unpack …/10-psmisc_22.21-2.1+b2_amd64.deb …
Unpacking psmisc (22.21-2.1+b2) …
Selecting previously unselected package libev4.
Preparing to unpack …/11-libev4_1%3a4.22-1+b1_amd64.deb …
Unpacking libev4 (1:4.22-1+b1) …
Selecting previously unselected package percona-xtrabackup-24.
Preparing to unpack …/12-percona-xtrabackup-24_2.4.12-1.stretch_amd64.deb …
Unpacking percona-xtrabackup-24 (2.4.12-1.stretch) …
Selecting previously unselected package socat.
Preparing to unpack …/13-socat_1.7.3.1-2+deb9u1_amd64.deb …
Unpacking socat (1.7.3.1-2+deb9u1) …
Selecting previously unselected package qpress.
Preparing to unpack …/14-qpress_11-1.stretch_amd64.deb …
Unpacking qpress (11-1.stretch) …
Selecting previously unselected package iproute.
Preparing to unpack …/15-iproute_1%3a4.9.0-1+deb9u1_all.deb …
Unpacking iproute (1:4.9.0-1+deb9u1) …
Setting up percona-xtradb-cluster-common-5.7 (5.7.22-29.26-1.stretch) …
update-alternatives: using /etc/mysql/percona-xtradb-cluster.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
update-alternatives: warning: not replacing /etc/mysql/my.cnf with a link
Selecting previously unselected package percona-xtradb-cluster-server-5.7.
(Reading database … 46237 files and directories currently installed.)
Preparing to unpack …/percona-xtradb-cluster-server-5.7_5.7.22-29.26-1.stretch_amd64.deb …
Unpacking percona-xtradb-cluster-server-5.7 (5.7.22-29.26-1.stretch) …
dpkg: error processing archive /var/cache/apt/archives/percona-xtradb-cluster-server-5.7_5.7.22-29.26-1.stretch_amd64.deb (–unpack):
trying to overwrite ‘/usr/lib/mysql/plugin/dialog.so’, which is also in package libmariadb3 10.2.17+maria~stretch
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Selecting previously unselected package percona-xtradb-cluster-57.
Preparing to unpack …/percona-xtradb-cluster-57_5.7.22-29.26-1.stretch_amd64.deb …
Unpacking percona-xtradb-cluster-57 (5.7.22-29.26-1.stretch) …
Errors were encountered while processing:
/var/cache/apt/archives/percona-xtradb-cluster-server-5.7_5.7.22-29.26-1.stretch_amd64.deb
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

Could anyone advise something how to handle this ? Thanks

Hello Joka.
You’ll need to remove the MariaDB packages before installing PXC. This looks to be the issue here.