Как остановить dist-upgrade от удаления MariaDB?

Аналогичный вопрос был задан в Частичное обновление - зачем удалять MariaDB? . Ответ на этот вопрос в основном заключался в том, что проблема заключается в dist-upgrade. Этот вопрос спрашивает, есть ли какое-то решение (или исправить).

Иногда необходимо выполнить dist-upgrade, а не просто обновление.

Можем ли мы что-то изменить в нашем списке sources.list (или в другом месте), чтобы сказать Ubuntu НЕ удалять MariaDB?

removing maria db on dist-upgrade

marc@db01:~$ dpkg --get-selections | grep mysql
libdbd-mysql-perl    install
libmysqlclient18     install
mysql-common     install

marc@db01:~$ dpkg --get-selections | grep maria
libmariadbclient18 install
mariadb-client-10.0 deinstall
mariadb-client-5.5 install
mariadb-client-core-5.5 install
mariadb-common install
mariadb-server install
mariadb-server-10.0 deinstall
mariadb-server-5.5 install
mariadb-server-core-5.5 install

marc@db01:~$ sudo apt-get check
Reading package lists... Done
Building dependency tree
Reading state information... Done

marc@db01:~$ dpkg --list | grep mysql
ii libdbd-mysql-perl 4.020-1build2 Perl5 database interface to the MySQL database
ii libmysqlclient18 5.5.34+maria-1~precise Virtual package to satisfy external depends
ii mariadb-common 5.5.34+maria-1~precise MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
ii mysql-common 5.5.34+maria-1~precise MariaDB database common files (e.g. /etc/mysql/my.cnf)

marc@db01:~$ sudo apt-get dist-upgrade -o Debug::pkgProblemResolver=true -o Debug::pkgProblemResolver::ShowScores=true 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Starting
Settings used to calculate pkgProblemResolver::Scores::
  Important => 3
  Required => 2
  Standard => 1
  Optional => -1
  Extra => -2
  Essentials => 100
  InstalledAndNotObsolete => 1
  Depends => 1
  Recommends => 1
  AddProtected => 10000
  AddEssential => 5000
Show Scores
10000 linux-image-3.8.0-29-generic [ amd64 ] < 3.8.0-29.42~precise1 > ( kernel )
6306 dpkg [ amd64 ] < 1.16.1.2ubuntu7.2 > ( admin )
5409 libc-bin [ amd64 ] < 2.15-0ubuntu10.5 > ( libs )
5371 debianutils [ amd64 ] < 4.2.1ubuntu2 > ( utils )
53 libsqlite3-0 [ amd64 ] < 3.7.9-2ubuntu1.1 > ( libs )
10 mariadb-common [ amd64 ] < 5.5.34+maria-1~precise > ( database )
8 mysql-common [ amd64 ] < 5.5.34+maria-1~precise -> 5.5.35-0ubuntu0.12.04.1 > (database )
6 libmariadbclient18 [ amd64 ] < 5.5.34+maria-1~precise > ( libs )
6 libmysqlclient18 [ amd64 ] < 5.5.34+maria-1~precise -> 5.5.35-0ubuntu0.12.04.1 > ( libs )
2 mariadb-client-5.5 [ amd64 ] < 5.5.34+maria-1~precise > ( misc )
2 mariadb-server-core-5.5 [ amd64 ] < 5.5.34+maria-1~precise > ( misc )
2 mariadb-client-core-5.5 [ amd64 ] < 5.5.34+maria-1~precise > ( misc )
1 mariadb-server-5.5 [ amd64 ] < 5.5.34+maria-1~precise > ( misc )
Starting 2
Investigating (0) mysql-common [ amd64 ] < 5.5.34+maria-1~precise -> 5.5.35-0ubuntu0.12.04.1 > ( database )
Broken mysql-common:amd64 Breaks on mysql-client-5.1 [ amd64 ] < none > ( none )
  Conflicts//Breaks against version 10.0.7+maria-1~precise for mariadb-client-10.0 but that is not InstVer, ignoring
  Considering mariadb-client-5.5:amd64 2 as a solution to mysql-common:amd64 8
  Added mariadb-client-5.5:amd64 to the remove list
Broken mysql-common:amd64 Breaks on mysql-client-core-5.1 [ amd64 ] < none > ( none )
  Considering mariadb-client-core-5.5:amd64 2 as a solution to mysql-common:amd64 8
  Added mariadb-client-core-5.5:amd64 to the remove list
Broken mysql-common:amd64 Breaks on mysql-server-core-5.1 [ amd64 ] < none > ( none )
  Considering mariadb-server-core-5.5:amd64 2 as a solution to mysql-common:amd64 8
  Added mariadb-server-core-5.5:amd64 to the remove list
  Conflicts//Breaks against version 5.5.34+maria-1~precise for mariadb-galera-server-5.5 but that is not InstVer, ignoring
  Fixing mysql-common:amd64 via remove of mariadb-client-5.5:amd64
  Fixing mysql-common:amd64 via remove of mariadb-client-core-5.5:amd64
  Fixing mysql-common:amd64 via remove of mariadb-server-core-5.5:amd64
Investigating (0) libmariadbclient18 [ amd64 ] < 5.5.34+maria-1~precise > ( libs )
Broken libmariadbclient18:amd64 Depends on libmysqlclient18 [ amd64 ] < 5.5.34+maria-1~precise -> 5.5.35-0ubuntu0.12.04.1 > ( libs ) (= 5.5.34+maria-1~precise)
  Considering libmysqlclient18:amd64 6 as a solution to libmariadbclient18:amd64 6
  Removing libmariadbclient18:amd64 rather than change libmysqlclient18:amd64
Investigating (0) mariadb-server-5.5 [ amd64 ] < 5.5.34+maria-1~precise > ( misc )
Broken mariadb-server-5.5:amd64 Depends on mariadb-client-5.5 [ amd64 ] < 5.5.34+maria-1~precise > ( misc ) (>= 5.5.34+maria-1~precise)
  Considering mariadb-client-5.5:amd64 2 as a solution to mariadb-server-5.5:amd64 1
  Removing mariadb-server-5.5:amd64 rather than change mariadb-client-5.5:amd64
Investigating (0) mariadb-server [ amd64 ] < 5.5.34+maria-1~precise > ( database )
Broken mariadb-server:amd64 Depends on mariadb-server-5.5 [ amd64 ] < 5.5.34+maria-1~precise > ( misc ) (= 5.5.34+maria-1~precise)
  Considering mariadb-server-5.5:amd64 1 as a solution to mariadb-server:amd64 0
  Removing mariadb-server:amd64 rather than change mariadb-server-5.5:amd64
Done
Done
The following packages will be REMOVED:
  libmariadbclient18 mariadb-client-5.5 mariadb-client-core-5.5 mariadb-server
  mariadb-server-5.5 mariadb-server-core-5.5
The following packages will be upgraded:
  libmysqlclient18 mysql-common
2 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
Need to get 957 kB of archives.
After this operation, 107 MB disk space will be freed.
Do you want to continue [Y/n]? n
Abort.
marc@db01:~$

Теперь, когда обновился MariaDB их PPA:

marc@db01:~$ apt-cache show mysql-common | grep Version
Version: 5.5.35+maria-1~precise
Version: 5.5.35-0ubuntu0.12.04.2
Version: 5.5.35-0ubuntu0.12.04.1
Version: 5.5.22-0ubuntu1
marc@db01:~$ apt-cache show libmysqlclient18 | grep Version
Version: 5.5.35+maria-1~precise
Version: 5.5.35-0ubuntu0.12.04.2
Version: 5.5.35-0ubuntu0.12.04.1
Version: 5.5.22-0ubuntu1

marc@db01:~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4
задан 13 April 2017 в 15:24

2 ответа

Broken mysql-common:amd64 Breaks on mysql-client-5.1 [ amd64 ]  ( none )
  Conflicts//Breaks against version 10.0.7+maria-1~precise for mariadb-client-10.0 but that is not InstVer, ignoring
  Considering mariadb-client-5.5:amd64 2 as a solution to mysql-common:amd64 8
  Added mariadb-client-5.5:amd64 to the remove list

Как видно, MariaDB ломается, если вы пытаетесь обновить MySQL. На данный момент вам следует полагаться только на sudo apt-get upgrade, чтобы предотвратить удаление MariaDB.

0
ответ дан 13 April 2017 в 15:24

MariaDB расскажет об этом в своей статье об установке пакетов deb, лучший способ исправить это - закрепить репозиторий MariaDB. Что вы можете сделать, выполнив следующие инструкции: https://mariadb.com/kb/en/install-mariadb-deb-files/#pinning-the-mariadb-repository (если вы прокрутите вверх, они также объясните, почему это происходит)

0
ответ дан 13 April 2017 в 15:24

Другие вопросы по тегам:

Похожие вопросы: