MySQL installation on centOS fails - dependency issues

I tried to install mysql on centOS following this digital ocean guide.

I ran the following commands;

wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
md5sum mysql80-community-release-el7-3.noarch.rpm
sudo rpm -ivh mysql80-community-release-el7-3.noarch.rpm
sudo yum install mysql-server

The first 3 commands execute successfully. However, the installation fails with a lot of dependency issues. I have gone through a lot of similar problems online, including this platform, but I've had no luck with solving mine.

SOME MORE CONTEXT

1: The output for uname -r

3.10.0-1127.19.1.el7.x86_64

2: The output for sudo yum install mysql-server

Error: Package: mysql-community-server-8.0.22-1.el8.x86_64 (mysql80-community) Requires: libssl.so.1.1()(64bit) Error: Package: mysql-community-client-8.0.22-1.el8.x86_64 (mysql80-community) Requires: libstdc++.so.6(CXXABI_1.3.9)(64bit) Error: Package: mysql-community-client-8.0.22-1.el8.x86_64 (mysql80-community) Requires: libssl.so.1.1(OPENSSL_1_1_1)(64bit) Error: Package: mysql-community-client-8.0.22-1.el8.x86_64 (mysql80-community) Requires: libstdc++.so.6(GLIBCXX_3.4.21)(64bit) Error: Package: mysql-community-server-8.0.22-1.el8.x86_64 (mysql80-community) Requires: libstdc++.so.6(CXXABI_1.3.11)(64bit) Error: Package: mysql-community-client-plugins-8.0.22-1.el8.x86_64 (mysql80-community) Requires: libstdc++.so.6(GLIBCXX_3.4.21)(64bit) Error: Package: mysql-community-client-8.0.22-1.el8.x86_64 (mysql80-community) Requires: libssl.so.1.1(OPENSSL_1_1_0)(64bit) Error: Package: mysql-community-libs-8.0.22-1.el8.x86_64 (mysql80-community) Requires: libstdc++.so.6(GLIBCXX_3.4.21)(64bit)

BLAH BLAH BLAH

Error: Package: mysql-community-server-8.0.22-1.el8.x86_64 (mysql80-community) Requires: libtirpc.so.3(TIRPC_0.3.3)(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

3: I mistakenly tried to install the el8 version at first. When I realized I had made a mistake, I did this;

sudo yum remove mysql80-community-release-el8-1.noarch
yum clean all

after which I confirmed that the old packages were gone;

yum list | grep mysql

akonadi-mysql.x86_64 1.9.2-4.el7 base

apr-util-mysql.x86_64 1.5.2-6.el7 base

dovecot-mysql.x86_64 1:2.2.36-6.el7_8.1 updates

freeradius-mysql.x86_64 3.0.13-10.el7_6 base

libdbi-dbd-mysql.x86_64 0.8.3-16.el7 base

mysql-connector-java.noarch 1:5.1.25-3.el7 base

mysql-connector-odbc.x86_64 5.2.5-8.el7 base

pcp-pmda-mysql.x86_64 4.3.2-7.el7_8 updates

php-mysql.x86_64 5.4.16-48.el7 base

php-mysqlnd.x86_64 5.4.16-48.el7 base

qt-mysql.i686 1:4.8.7-8.el7 base

qt-mysql.x86_64 1:4.8.7-8.el7 base

qt5-qtbase-mysql.i686 5.9.7-2.el7 base

qt5-qtbase-mysql.x86_64 5.9.7-2.el7 base

redland-mysql.x86_64 1.0.16-6.el7 base

rsyslog-mysql.x86_64 8.24.0-52.el7_8.2 updates

yum repolist

Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: uk.mirrors.clouvider.net * extras: mirrors.ukfast.co.uk * updates: mirrors.ukfast.co.uk repo id
repo name
status base/7/x86_64
CentOS-7 - Base
10,070 extras/7/x86_64
CentOS-7 - Extras
413 updates/7/x86_64
CentOS-7 - Updates
1,134 repolist: 11,617

I have no idea why I still can't install mysql, even after getting rid of the wrong package and clearing cache. Any ideas?


Solution 1:

You still need to clean out the metadata from the inappropriate yum repo you had installed.

yum clean metadata

After this, you should be able to install packages.