Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

A similar question was asked at Partial upgrade - why remove MariaDB?. The answer to that question basically was stating that dist-upgrade is the issue. This question is asking if there is some workaround (or fix).

Sometimes it is necessary to do a dist-upgrade and not just an upgrade.

Can we change something in our sources.list (or elsewhere) to tell Ubuntu to NOT remove 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:~$

Now that MariaDB has updated their 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.
share|improve this question
    
There is another similar question at askubuntu.com/questions/330003/… that could help resolve this issue. –  vegantriathlete Jan 22 at 19:06
    
possible duplicate of How to prevent updating of a specific package? –  Sneetsher Jan 22 at 19:14
    
@Braiam: Sorry, there is no apt-get cache. Did you want me to do something with apt-cache? –  vegantriathlete Jan 26 at 19:24
2  
@Sneetsher: I'm not sure that holding the package is what I need to do. It's not so much that I care whether libmysqlclient18 and mysql-common get upgraded. It's that I don't want all the various maria packages to be removed. –  vegantriathlete Jan 26 at 19:39
    
Actually, it seems that I also don't want to place those packages on hold, as they are the maria versions of the packages. See (improperly formatted) comment below. –  vegantriathlete Jan 26 at 19:55

2 Answers 2

up vote 0 down vote accepted
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

As can be seen MariaDB breaks if you try to upgrade mysql. You should only rely on sudo apt-get upgrade for the time being to prevent MariaDB removal.

share|improve this answer
    
I think that this conflict may be resolved by following the pinning option I referenced (and @y3kdaniel also sugggested)? I do wonder if I need to do some purge of the maria 10.0 stuff, though. –  vegantriathlete Jan 26 at 21:55
    
@vegantriathlete you don't need to pin anything. dist-upgrade will remove packages if they prevent the upgrading of others, or the upgrading breaks them. This case is the later. Just don't do dist-upgrade and you will be fine. –  Braiam Jan 26 at 21:59
    
But, I may need to do a dist-upgrade for some other things down the line. I don't think that avoiding dist-upgrade is going to give me a long-term solution. –  vegantriathlete Jan 26 at 22:02
    
@vegantriathlete dist-upgrade is not normally needed for normal Ubuntu functionality, actually if you do sudo aptitude safe-upgrade would be the best. I wouldn't ask you to hold or pin package since that may cause problems later. Just wait until the PPA of mariadb updates their stuff. –  Braiam Jan 26 at 22:07
    
Yeah, I agree that holding those packages is definitely not going to help me in this situation. But, I think that pinning might. But, if you suggest waiting for the PPA of mariadb is updated, then what do I do to get that wrapped into my server? Is that going to happen with a sudo apt-get update? (Sorry for the tangential n00b question) –  vegantriathlete Jan 26 at 22:23

MariaDB cover this in their article on installing deb packages, best way to fix it is by pinning the MariaDB repo. Which you can do by following these instructions: https://mariadb.com/kb/en/installing-mariadb-deb-files/#pinning-the-mariadb-repository (if you scroll up they also explain why it happens)

share|improve this answer
    
Yes, that is also linked to in the 365992 question I placed in my comments above. I will be investigating this further. If it solves the issue, I will make sure to accept this answer. Thanks for confirming what I was proposing. –  vegantriathlete Jan 26 at 21:53
    
Sorry, I missed that. The pinning works best for me, as it means that MariaDB packages will take preference over those from Ubuntu (i.e MySQL), since they are both named the same to make MariaDB a drop in replacement. –  y3kdaniel Jan 28 at 3:39
    
I would imagine that following this pinning option would also have gotten around the issue for me as well. However, then I think I would need to undo the pinning once the MariaDB version numbers of the packages had caught up to the mySQL ones. So, IMO waiting did turn out to be the better answer. NOTE: the referenced post on MariaDB does explain what was happening with the version numbers of those two packages. Now that Maria has updated their PPA the issue of the version number differences has gone away. –  vegantriathlete Jan 30 at 18:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.