5

I tried installing and I am seeing the error

Error: Package: mysql-community-server-5.7.17-1.el7.x86_64 (mysql57-community)
       Requires: systemd
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

I also removed all previous installations. How can I fix this?

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
Santosh Pillai
  • 153
  • 1
  • 1
  • 4
  • 1
    Last time I checked AMI does not run `systemd` hence the error. Try `sudo yum clean all` followed by `sudo yum update` before trying again to install MySQL – Rui F Ribeiro Jan 04 '17 at 12:01
  • Thanks Rui. Here's what I tried : yum remove mysql-server yum remove "mysql*" sudo yum update killall mysqld; killall mysqld_safe yum localinstall https://dev.mysql.com/get/mysql57-community-release-el5-7.noarch.rpm yum install mysql-community-server I am still seeing the error Error: Package: mysql-community-server-5.7.17-1.el7.x86_64 (mysql57-community) Requires: systemd – Santosh Pillai Jan 04 '17 at 12:11
  • 1
    Please add to the question the details. If you are using mysql/Oracle repos you should select generic-linux for AMI boxes and not RH packages. File also a bug/request with Oracle for AMI rpm packages, please. Check also what versions can you find in AMI repositories. – Rui F Ribeiro Jan 04 '17 at 12:16

4 Answers4

3

If you are using mysql/Oracle repos you should select Linux-generic in the Download MySQL Community Server page for AMI boxes and not RedHat/Fedora packages.

Last time I checked AMI does not run systemd hence the error. While in past you could somewhat get away with installing RH packages in AMI Linux, nowadays with the convergence of Linux versions to systemd it is ever more difficult to install foreign packages in distributions which do not support systemd.

File also a bug/request with Oracle for AMI rpm packages, please.

Check also what versions can you find in AMI repositories, just in case.

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
  • 1
    AMI repo has mysql Server version: 5.5 and 5.6 – Santosh Pillai Jan 04 '17 at 15:42
  • What about using the rh6 packages? That is what AMI is currently based on... – jeffmcneill Jul 13 '17 at 05:10
  • if this fails, try flushing the cache and see if it resolves dependency issues here https://serverfault.com/questions/873955/how-solve-mysql-5-7-dependency clean all also suggest sudo rm -rf /var/cache/yum/* , that was required to get it to work for me – ppostma1 Oct 11 '19 at 01:31
1

okay, I had given the same task to my junior and he referred me this link and said it is not possible to install MySQL5.7 on Amazon AMI. But I tried it is actually possible. You should download the mysql57-community-release-el6-11.noarch.rpm (suitable with CentOS/RHEL 6 OS and install it). After installing the community release when you do

wget https://dev.mysql.com/get/mysql57-community-release-el6-11.noarch.rpm yum install mysql-community-server -y

You will get MySQL5.7 version installed and working on Amazon Linux AMI

1

As of sometime since 2017, Amazon has provided a compatible MySQL 5.7 package.

yum install mysql57-server

If you are updating an existing MySQL 5.5 installation, you will most likely need to

mysql_upgrade --force -uroot -p

at least once, and then stop and restart mysqld.

hbquikcomjamesl
  • 141
  • 1
  • 7
0

Amazon Linux does not support systemd, so if any package requires systemd to be installed first, that package will not be installed.

I would suggest that you use CentOS or another RHEL-based distribution instead which has full support for SystemD and therefore will not experience the same issues.

ProfFalken
  • 101
  • 1
  • 2
    WarGames...old ;)... If I were the OP I would prefer to use AMI in AWS, as it is better supported and you can find lot of specific how tos for it. I would also prefer going the Debian/Ubuntu route if not using AMI (we do not know the OP preferences to be fair). Your answer while technically correct, fails to address directly the question. – Rui F Ribeiro Jan 04 '17 at 12:26