0

My system has a broken MariaDb update going from 10.3 to 10.4. MariaDb does still work fine, but now I am having system upgrade issues. I have tried looking online for solutions but can't seem to find anything. Problem:

$ sudo apt-get upgrade               
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
  mariadb-server-10.3 : Depends: mariadb-client-10.3 (>= 1:10.3.28+maria~buster) but 1:10.3.27-0+deb10u1 is installed
  mariadb-server-core-10.3 : Breaks: mariadb-client-10.3 (< 1:10.3.28+maria~buster) but 1:10.3.27-0+deb10u1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

While I try to fix-broken :

$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libconfig-inifiles-perl libsnappy1v5
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  mariadb-client-10.3 mariadb-client-core-10.3
The following packages will be upgraded:
  mariadb-client-10.3 mariadb-client-core-10.3
2 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
6 not fully installed or removed.
Need to get 0 B/1,868 kB of archives.
After this operation, 19.6 MB disk space will be freed.
Do you want to continue? [Y/n] Y
Reading changelogs... Done
dpkg: regarding .../mariadb-client-core-10.3_1%3a10.3.28+maria~buster_amd64.deb containing mariadb-client-core-10.3:
 mariadb-client-10.3 conflicts with mysql-client-core-5.5
  mariadb-client-core-10.3 provides mysql-client-core-5.5 and is to be installed.

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

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

Are there multiple packages installed? Any ideas?


edit: adding more info

Please edit your post to show the contents of your /etc/apt/sources.list:

deb http://deb.debian.org/debian/ buster main
deb-src http://deb.debian.org/debian/ buster main

deb http://security.debian.org/debian-security buster/updates main contrib
deb-src http://security.debian.org/debian-security buster/updates main contrib

# buster-updates, previously known as 'volatile'
deb http://deb.debian.org/debian/ buster-updates main contrib
deb [arch=arm64,ppc64el,amd64] http://mariadb.mirror.globo.tech/repo/10.3/debian buster main
# deb-src [arch=arm64,ppc64el,amd64] http://mariadb.mirror.globo.tech/repo/10.3/debian buster main
deb [arch=arm64,ppc64el,amd64] http://mariadb.mirror.globo.tech/repo/10.4/debian buster main
# deb-src [arch=arm64,ppc64el,amd64] http://mariadb.mirror.globo.tech/repo/10.4/debian buster main
deb-src http://deb.debian.org/debian/ buster-updates main contrib

and any *.list files in /etc/apt/sources.list.d: ondrej-ubuntu-php-impish.list php7.list

14
  • 2
    "mariadb-client-10.3 conflicts with mysql-client-core-5.5" Have you looked in to that? (You cannot have both installed--MariaDB takes over the role, and binaries, of MySQL. It's fully backwards compatible, so you won't lose MySQL functionality.)
    – C. M.
    Apr 24 at 6:10
  • 1
    Do yo use MariaDB packages from MariaDB repo or Debian? I think you use MariaDB's repo. If you sort out mysql client confict, as C. M. noted, and still have problems, you could try to remove MariaDB repo and install/update using Debian repo packages. Currently, the latter provides MariaDB version 10.3.27-0+deb10u1 on Debian 10.9 Buster.
    – Krackout
    Apr 24 at 7:07
  • Explaining in the question how the problem initially happened often helps solving it (eg: use of dpkg -i instead of apt-get install?)
    – A.B
    Apr 24 at 13:51
  • @Krackout I should uninstall mysql?
    – pmichaels
    Apr 26 at 2:48
  • @A.B I set up the server over a year ago following a tutorial that had me install MariaDB on a fresh Debian 10. Now I am trying to update MariaDb.
    – pmichaels
    Apr 26 at 2:50
0

I had earlier face the problem also in Kali. If /etc/apt/sources.list.d isn't empty than "remove" everything inside the directory. It is better to rename those files rather than removing. You should try following command.

sudo apt clean
sudo apt-get autoclean
sudo apt-get update
sudo apt-get upgrade

If you keep face the issue than try

sudo apt --fix-broken install
sudo apt-get upgrade

If you again face the problem than run as a root user(sudo su)

sudo su
apt --fix-broken install
apt upgrade
4
  • I tried this and I still have the same output as originally.
    – pmichaels
    Apr 26 at 2:45
  • 1
    Please do not suggest removal of of any system-critical files. If anything, suggest renaming the files/directories, so they can be restored if it was not helpful. (Also, it should be /etc/apt/sources.list.d, not "sources.d".)
    – C. M.
    Apr 26 at 6:14
  • @C.M. Oh yeah that's sources.list.d not sources.d I just wrote as the answer I couldn't check cause, I am not using Debian Based Distro now..
    – user449077
    Apr 26 at 7:07
  • 1
    @Istiak: Please edit your answer to correct that. And also, please do as I suggested and advise them to rename the folder, not delete everything in it. Many "newbies" will do exactly what you said, and become angry and frustrated when it fails--and they've irrevocably deleted all their repository sources.
    – C. M.
    Apr 26 at 8:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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