星期五, 9月 27, 2019

Upgrade MariaDB 10.1 @ ubuntu18.01 error

problem: 


dpkg: regarding .../mariadb-client-core-10.1_1%3a10.1.41+maria-1~bionic_amd64.deb containing mariadb-client-core-10.1:
 mariadb-client-10.1 conflicts with mysql-client-core-5.5
  mariadb-client-core-10.1 provides mysql-client-core-5.5 and is to be installed.

dpkg: error processing archive /var/cache/apt/archives/mariadb-client-core-10.1_1%3a10.1.41+maria-1~bionic_amd64.deb (--unpack):
 conflicting packages - not installing mariadb-client-core-10.1
dpkg: regarding .../mariadb-client-10.1_1%3a10.1.41+maria-1~bionic_amd64.deb containing mariadb-client-10.1:
 mariadb-client-core-10.1 conflicts with mysql-client-5.5
  mariadb-client-10.1 provides mysql-client-5.5 and is to be installed.

dpkg: error processing archive /var/cache/apt/archives/mariadb-client-10.1_1%3a10.1.41+maria-1~bionic_amd64.deb (--unpack):
 conflicting packages - not installing mariadb-client-10.1
Errors were encountered while processing:
 /var/cache/apt/archives/mariadb-client-core-10.1_1%3a10.1.41+maria-1~bionic_amd64.deb
 /var/cache/apt/archives/mariadb-client-10.1_1%3a10.1.41+maria-1~bionic_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

solve:

  1.  remove package by dpkg , don't using apt or apt-get
    sudo dpkg --remove mariadb-server-core-10.1 mariadb-server-10.1 mariadb-client-core-10.1 mariadb-client-10.1
  2. update your apt repo : https://downloads.mariadb.org/mariadb/repositories/#distro=Ubuntu&distro_release=bionic--ubuntu_bionic&mirror=ossplanet&version=10.1
  3. then reinstall it or upgrade to mariadb 10.4