在CentOS 6.5上安装MySQL 5.6时处理依赖性错误

时间:2014-09-12 22:24:56

标签: mysql mysql-error-1064 centos6

我在这里发表文章https://www.digitalocean.com/community/tutorials/how-to-install-mysql-5-6-from-official-yum-repositories在CentOS上安装MySQL 5.6。

但是当我跑步时:     sudo yum install mysql-community-server

我看到以下错误:

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

实际上,无论我如何执行yum install mysql mysql-server,我都会得到同样的错误。我在网上搜索,但缺乏资源提到'systemd'和'libstdc ++。so.6'有什么问题,以及如何解决这个问题。

2 个答案:

答案 0 :(得分:0)

在:

yum install openssh-server wget
yum -y update

列出您的回购并删除mysql-community...

yum repolist

安装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

在此文件中添加priority=10

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

从新的repos安装将是好的:

yum install mysql mysql-server

之后可能会这样做:

chkconfig --levels 235 mysqld on
service mysqld start
/usr/bin/mysql_secure_installation

答案 1 :(得分:0)

对于您找不到的每个图书馆,只需做一个“yum”提供的'为此,然后安装包

e.g。

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

然后你会yum install systemd libstdc++根据你的搜索结果,你可能需要yum install libstdc++-<version>