4

I followed an article here https://www.digitalocean.com/community/tutorials/how-to-install-mysql-5-6-from-official-yum-repositories to install MySQL 5.6 on CentOS.

But when I run: sudo yum install mysql-community-server

I see following errors:

Error: Package: mysql-community-server-5.6.20-4.el7.x86_64 (mysql56-community)
       Requires: systemd
Error: Package: mysql-community-server-5.6.20-4.el7.x86_64 (mysql56-community)
       Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

In fact, no matter how I execute yum install mysql mysql-server, I'll get the same errors. I searched online, but lack of resources mentioned what's wrong with 'systemd' and 'libstdc++.so.6' and how to solve this issue.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
M老立
  • 347
  • 7
  • 17
  • 1
    This isn't a programming question so it's offtopic here. Note though, that you're trying to install a package built for RHEL/Centos 7.. – nos Sep 12 '14 at 23:32
  • Thanks a lot nos! Wrong version is my problem! – M老立 Sep 14 '14 at 08:32

2 Answers2

0

Before:

yum install openssh-server wget
yum -y update

List your repos and delete mysql-community...

yum repolist

Install nessary repos:

rpm -ihv http://mirror.yandex.ru/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ihv http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum install yum-priorities

Add priority=10 in this files:

vi /etc/yum.repos.d/epel.repo
vi /etc/yum.repos.d/nginx.repo
vi /etc/yum.repos.d/remi.repo

And from new repos installation will be good:

yum install mysql mysql-server

After may be doing this:

chkconfig --levels 235 mysqld on
service mysqld start
/usr/bin/mysql_secure_installation
shilovk
  • 11,718
  • 17
  • 75
  • 74
0

for each of the libraries you cannot find, simply do a 'yum provides' for it, then install the package

e.g.

yum provides systemd
yum provides libstdc++.so.6

then you would do yum install systemd libstdc++ you may need to do a yum install libstdc++-<version> depending on your search results.

Moe Singh
  • 809
  • 7
  • 12