Score:2

Cannot start mysql-server on Amazon Linux 2 due to dependency issues

in flag

I'm trying to install MySQL on a Amazon Linux 2 server and I can't seem to get past this dependency issue (prevents server pkgs etc being installed thus preventing me from starting a mysql-server.

Commands I ran are below:

sudo wget https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm
sudo rpm -Uvh mysql80-community-release-el8-1.noarch.rpm
sudo yum install mysql-server
sudo yum provides */libmysqlclient.so.18
sudo yum install mariadb-libs-5.5.68-1.amzn2.x86_64
sudo systemctl status mysqld
sudo systemctl start mysqld

The following errors I receive when attempting sudo yum install mysql-server and sudo status mysql-server:

sudo yum install mysql-server

sudo systemctl status mysql-server

No clue how to proceed from here, haven't been able to find any helpful resources online, would be very grateful if someone here could help me install and get the MySQL server up and running, as this is something I'm struggling with for work.

Kindest regards.

jm flag
You are trying to install a CentOS 8 (`el8`) rpm on a CentOS 7 server. That will generally cause issues.
newtothis avatar
in flag
Well what's weird was that when I (thought) I had wiped all of the 8.1rpm in favour of 7.3, it was finding and installing 8.1 rather than 7.3. Have also tried to hard-delete all existence of 8.1 and still had issues. Can you provide some visibility on how to fully rm all 8.1 artefacts ?
Michael Hampton avatar
cz flag
It's not even a CentOS 7 server. Amazon Linux 2 _forked_ from CentOS years ago, and has diverged so far at this point that many packages are not compatible. Stop here and start over with anything but Amazon Linux (which is not a stable distro).
Score:2
gp flag
Tim

Amazon Linux may have been based on Centos in the past, but it's a standalone distro. Don't treat it like Centos or things will go badly. My experience over the years with AL / AL2 is that it's much more difficult to install software and get support, so I don't use it any more except for the simplest use cases. I prefer Ubuntu, the software available and support are MUCH better.

If your server is new and easily replaced I'd discard it and create a new one before going forward. If not you need to roll back the changes you made above before trying again.

If you must use AL2, Amazon has a tutorial for installing MariaDB here. It doesn't use external repos so if that will work for you give it a go.

Otherwise follow an AL2 / MySQL8 tutorial rather than a Centos tutorial. I've found a couple on Google here and here, but I can't vouch for either.

newtothis avatar
in flag
I will look into this and let you know how I go!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.