1

I wanted to simply update rvm with ruby 2.3:

rvm install ruby-2.3.0

But I got some dependency issues:

Error running 'requirements_debian_libs_remove libssl-dev',
please read /home/john/.rvm/log/1568069021_ruby-2.3.0/package_remove_libssl-dev.log

The log file informed me the issue was related to mariadb:

tail -n 100 /home/john/.rvm/log/1568069021_ruby-2.3.0/package_remove_libssl-dev.log

The following packages have unmet dependencies:
 mariadb-server : Depends: mariadb-server-10.1 (= 1:10.1.41+maria-1~bionic) but 1:10.1.40-0ubuntu0.18.04.1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I tried to let it resolve the dependency issue but it did not work out:

sudo apt --fix-broken install

dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
dpkg: regarding .../mariadb-server-core-10.1_1%3a10.1.41+maria-1~bionic_amd64.deb containing mariadb-server-core-10.1:
 mariadb-server-10.1 conflicts with mysql-server-core-5.5
  mariadb-server-core-10.1 provides mysql-server-core-5.5 and is to be installed.

dpkg: error processing archive /var/cache/apt/archives/mariadb-server-core-10.1_1%3a10.1.41+maria-1~bionic_amd64.deb (--unpack):
 conflicting packages - not installing mariadb-server-core-10.1
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
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 /var/cache/apt/archives/mariadb-server-10.1_1%3a10.1.41+maria-1~bionic_amd64.deb
 /var/cache/apt/archives/mariadb-server-core-10.1_1%3a10.1.41+maria-1~bionic_amd64.deb
 /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)

So I tried to manually remove mariadb, but still the dependency error occurs:

$ sudo apt-get purge mariadb-server-core-10.1

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 : Depends: mariadb-server-10.1 (= 1:10.1.41+maria-1~bionic) but 1:10.1.40-0ubuntu0.18.04.1 is to be installed
 mariadb-server-10.1 : Depends: mariadb-server-core-10.1 (>= 1:10.1.40-0ubuntu0.18.04.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

This is my local machine, so I don't remind removing things. But I can't install ruby 2.3 or remove mariadb in order to install ruby 2.3. What is the solution here?

1

Apparently, I had some versions of MariaDB and some versions of MySQL installed and Ubuntu could no longer decipher all this. Perhaps I had an older version of a MySQL database and trying to run a newer version of the server. It was not exactly clear as to the confusion the server was going through. But to address the situation, I deleted literally everything MySQL:

PKGS="mysql-server mariadb-client mariadb-server-10.0 mariadb-common"
sudo apt-get check
sudo apt remove $PKGS
sudo apt purge $PKGS
sudo apt autoremove
sudo apt-get --purge remove "mysql*"
sudo rm -rf /etc/mysql/ 
sudo updatedb
locate mysql
sudo rm -rf /etc/apparmor.d/abstractions/mysql
sudo rm -rf /etc/apparmor.d/cache/usr.sbin.mysqld
 sudo rm -rf /etc/default/mysql
sudo rm -rf /etc/systemd/system/mysqld.service
sudo rm -rf /home/dan/.mysql_history
sudo rm -rf /var/cache/apt/archives/libmysqlclient18_1%3a10.1.41+maria-1~bionic_amd64.deb
sudo rm -rf /var/cache/apt/archives/libmysqlclient20_5.7.27-0ubuntu0.18.04.1_amd64.deb
 sudo rm -rf /var/cache/apt/archives/mysql-client-5.7_5.7.27-0ubuntu0.18.04.1_amd64.deb
sudo rm -rf /var/cache/apt/archives/mysql-client-core-5.7_5.7.27-0ubuntu0.18.04.1_amd64.deb
sudo rm -rf /var/cache/apt/archives/mysql-common_1%3a10.1.41+maria-1~bionic_all.deb
sudo rm -rf /var/cache/apt/archives/mysql-server-5.7_5.7.27-0ubuntu0.18.04.1_amd64.deb
sudo rm -rf /var/cache/apt/archives/mysql-server-core-5.7_5.7.27-0ubuntu0.18.04.1_amd64.deb
 sudo rm -rf /var/cache/apt/archives/mysql-server_5.7.27-0ubuntu0.18.04.1_all.deb
sudo rm -rf /var/lib/mysqld
sudo rm -rf /var/lib/systemd/deb-systemd-helper-enabled/mysql.service
sudo rm -rf /var/lib/systemd/deb-systemd-helper-enabled/mysqld.service

At this point, there was no trace of MariaDB or MySQL on my system. Now I was able to install MariaDB 10.1 clean:

$ apt-cache policy software-properties-common
software-properties-common:
  Installed: 0.96.24.32.11

MariaDB repository public key used by the package management system:

sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8

add MariaDB 10.1 repository to your Ubuntu:

sudo sh -c "echo 'deb https://mirrors.evowise.com/mariadb/repo/10.1/ubuntu '$(lsb_release -cs)' main' > /etc/apt/sources.list.d/MariaDB101.list"

Then install mariadb:

sudo apt-get update
sudo apt-get install mariadb-server mariadb-client

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.