文档章节

CentOS7编译安装MySQL5.7之后安装mysql-devel出错解决方案

小致Daddy
 小致Daddy
发布于 2016/09/14 09:15
字数 1262
阅读 2844
收藏 0

由于我的MySQL是自己编译安装,但是安装之后/etc/yum.repos.d/目录下并没有MySQL的源,导致我在安装mysql-devel出错。

缺少MySQL的源:

[root@localhost liuyuantao]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
CentOS-Base.repo  CentOS-CR.repo  CentOS-Debuginfo.repo  CentOS-fasttrack.repo  CentOS-Media.repo  CentOS-Sources.repo  CentOS-Vault.repo  mongodb-org-3.2.repo

具体错误如下:

[root@localhost liuyuantao]# yum -y install mysql-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.cqu.edu.cn
 * extras: mirrors.163.com
 * updates: mirrors.163.com
Resolving Dependencies
--> Running transaction check
---> Package mariadb-devel.x86_64 1:5.5.50-1.el7_2 will be installed
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.50-1.el7_2 for package: 1:mariadb-devel-5.5.50-1.el7_2.x86_64
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 1:mariadb-devel-5.5.50-1.el7_2.x86_64
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.50-1.el7_2 will be installed
Removing mariadb-libs.x86_64 1:5.5.50-1.el7_2 - u due to obsoletes from installed mysql-community-libs-5.7.14-1.el7.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.50-1.el7_2 will be installed
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.50-1.el7_2 for package: 1:mariadb-devel-5.5.50-1.el7_2.x86_64
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 1:mariadb-devel-5.5.50-1.el7_2.x86_64
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.47-1.el7_2 will be installed
---> Package mariadb-libs.x86_64 1:5.5.50-1.el7_2 will be installed
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.50-1.el7_2 for package: 1:mariadb-devel-5.5.50-1.el7_2.x86_64
Removing mariadb-libs.x86_64 1:5.5.47-1.el7_2 - u due to obsoletes from installed mysql-community-libs-5.7.14-1.el7.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.47-1.el7_2 will be installed
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 1:mariadb-devel-5.5.50-1.el7_2.x86_64
---> Package mariadb-libs.x86_64 1:5.5.50-1.el7_2 will be installed
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.50-1.el7_2 for package: 1:mariadb-devel-5.5.50-1.el7_2.x86_64
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.44-2.el7.centos will be installed
---> Package mariadb-libs.x86_64 1:5.5.50-1.el7_2 will be installed
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.50-1.el7_2 for package: 1:mariadb-devel-5.5.50-1.el7_2.x86_64
Removing mariadb-libs.x86_64 1:5.5.44-2.el7.centos - u due to obsoletes from installed mysql-community-libs-5.7.14-1.el7.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.44-2.el7.centos will be installed
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 1:mariadb-devel-5.5.50-1.el7_2.x86_64
---> Package mariadb-libs.x86_64 1:5.5.50-1.el7_2 will be installed
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.50-1.el7_2 for package: 1:mariadb-devel-5.5.50-1.el7_2.x86_64
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 1:mariadb-devel-5.5.50-1.el7_2.x86_64
--> Finished Dependency Resolution
Error: Package: 1:mariadb-devel-5.5.50-1.el7_2.x86_64 (updates)
           Requires: libmysqlclient.so.18()(64bit)
           Available: 1:mariadb-libs-5.5.44-2.el7.centos.x86_64 (base)
               libmysqlclient.so.18()(64bit)
           Available: 1:mariadb-libs-5.5.47-1.el7_2.x86_64 (updates)
               libmysqlclient.so.18()(64bit)
           Available: 1:mariadb-libs-5.5.50-1.el7_2.x86_64 (updates)
               libmysqlclient.so.18()(64bit)
Error: Package: 1:mariadb-devel-5.5.50-1.el7_2.x86_64 (updates)
           Requires: mariadb-libs(x86-64) = 1:5.5.50-1.el7_2
           Available: 1:mariadb-libs-5.5.44-2.el7.centos.x86_64 (base)
               mariadb-libs(x86-64) = 1:5.5.44-2.el7.centos
           Available: 1:mariadb-libs-5.5.47-1.el7_2.x86_64 (updates)
               mariadb-libs(x86-64) = 1:5.5.47-1.el7_2
           Available: 1:mariadb-libs-5.5.50-1.el7_2.i686 (updates)
              ~mariadb-libs(x86-32) = 1:5.5.50-1.el7_2
Error: Package: 1:mariadb-devel-5.5.50-1.el7_2.x86_64 (updates)
           Requires: mariadb-libs(x86-64) = 1:5.5.50-1.el7_2
           Installing: 1:mariadb-libs-5.5.44-2.el7.centos.x86_64 (base)
               mariadb-libs(x86-64) = 1:5.5.44-2.el7.centos
           Available: 1:mariadb-libs-5.5.47-1.el7_2.x86_64 (updates)
               mariadb-libs(x86-64) = 1:5.5.47-1.el7_2
           Available: 1:mariadb-libs-5.5.50-1.el7_2.i686 (updates)
              ~mariadb-libs(x86-32) = 1:5.5.50-1.el7_2
Error: Package: 1:mariadb-devel-5.5.50-1.el7_2.x86_64 (updates)
           Requires: mariadb-libs(x86-64) = 1:5.5.50-1.el7_2
           Available: 1:mariadb-libs-5.5.44-2.el7.centos.x86_64 (base)
               mariadb-libs(x86-64) = 1:5.5.44-2.el7.centos
           Installing: 1:mariadb-libs-5.5.47-1.el7_2.x86_64 (updates)
               mariadb-libs(x86-64) = 1:5.5.47-1.el7_2
           Available: 1:mariadb-libs-5.5.50-1.el7_2.i686 (updates)
              ~mariadb-libs(x86-32) = 1:5.5.50-1.el7_2
 You could try using --skip-broken to work around the problem
** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows:
icedtea-web-1.6.1-4.el7.x86_64 has missing requires of java-1.8.0-openjdk
jline-1.0-8.el7.noarch has missing requires of java >= ('0', '1.5', None)

上面的错误由于没有MySQL的源,导致在安装mysql-devel的时候会提示安装mariadb-devel-5.5.50-1.el7_2.x86_64,并且系统并没有mysql_config,(缺少mysql_config在安装mysql-python的时候会提示出错,如果出现安装mysql-python错误,请查看CentOS7使用pip安装mysql-python出错解决方案)。

具体解决方案:

1.需要安装MySQL的源

wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm

2.这是在/etc/yum.repos.d/目录下会出现MySQL的相关repo

[root@localhost tmp]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Media.repo    CentOS-Vault.repo     mysql-community.repo
CentOS-CR.repo    CentOS-fasttrack.repo  CentOS-Sources.repo  mongodb-org-3.2.repo  mysql-community-source.repo

3.现在有MySQL的源,可以安装mysql-devel了

[root@localhost yum.repos.d]# yum install mysql-devel
Loaded plugins: fastestmirror, langpacks
mysql-connectors-community                                                                                                                          | 2.5 kB  00:00:00     
mysql-tools-community                                                                                                                               | 2.5 kB  00:00:00     
mysql57-community                                                                                                                                   | 2.5 kB  00:00:00     
mysql57-community/x86_64/primary_db                                                                                                                 |  76 kB  00:00:00     
Loading mirror speeds from cached hostfile
 * base: mirrors.cqu.edu.cn
 * extras: mirrors.163.com
 * updates: mirrors.163.com
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-devel.x86_64 0:5.7.15-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================================================================================================
 Package                                         Arch                             Version                                Repository                                   Size
===========================================================================================================================================================================
Installing:
 mysql-community-devel                           x86_64                           5.7.15-1.el7                           mysql57-community                           3.6 M

Transaction Summary
===========================================================================================================================================================================
Install  1 Package

Total download size: 3.6 M
Installed size: 21 M
Is this ok [y/d/N]: y
Downloading packages:
mysql-community-devel-5.7.15-1.el7.x86_64.rpm                                                                                                       | 3.6 MB  00:00:05     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows:
icedtea-web-1.6.1-4.el7.x86_64 has missing requires of java-1.8.0-openjdk
jline-1.0-8.el7.noarch has missing requires of java >= ('0', '1.5', None)
  Installing : mysql-community-devel-5.7.15-1.el7.x86_64                                                                                                               1/1 
  Verifying  : mysql-community-devel-5.7.15-1.el7.x86_64                                                                                                               1/1 

Installed:
  mysql-community-devel.x86_64 0:5.7.15-1.el7                                                                                                                              

Complete!
[root@localhost yum.repos.d]# 

 

© 著作权归作者所有

小致Daddy

小致Daddy

粉丝 185
博文 555
码字总数 592175
作品 0
济南
技术主管
私信 提问
CentOS7使用pip安装mysql-python出错解决方案

具体错误: 上面的错误是由于缺少mysqlconfig文件导致,查看下mysqlconfig文件是否存在 果然mysqlconfig没有找到,是因为缺少mysql-devel,导致mysqlconfig丢失,安装mysql-devel即可。 若提...

楠木楠
2016/09/14
2.5K
0
CentOS7.3安装Jumpserver0.3.2

公司服务器前端增加堡垒机,选用开源的jumpserver 软件环境 CentOS Linux release 7.3.1611 python 2.7.5 mysql5.7 安装git yum -y install git 克隆jumpserver # cd /opt git clone https:......

zhusas
2017/07/11
0
0
再谈centOS7.2 LAMP源码安装及注意要点

之前在另一篇文章里介绍过《centOS7 LAMP安装及注意要点》,用的是yum自带安装。 一个朋友在阿里云上买了ECS云主机,选择是最新的centos7.2 64位操作系统,帮忙配置一下环境。在这里做一下记...

lock-li
2016/09/01
569
0
mysql5.7:mysql安装和基于SSL加密的主从复制(详细剖析)

小生博客:http://xsboke.blog.51cto.com 小生 Q Q:1770058260 -------谢谢您的参考,如有疑问,欢迎交流 目录: --------mysql-5.7.13简介及安装 --------配置mysql-5.7.13的ssl加密传输 ...

小生博客
2017/05/07
0
0
Centos 7.4 安装ipython和mysql-python遇到的问题

pip安装ipython报错记录 #pip install ipython==5.5.0 Collecting ipython==5.5.0 Downloading http://mirrors.aliyun.com/pypi/packages/08/2c/6285504003b4eadce5540f3ee3adc081468b26723f......

boy461205160
2017/12/06
0
0

没有更多内容

加载失败,请刷新页面

加载更多

反编译9.png图片还原

本文链接:https://blog.csdn.net/a1140778530/article/details/10528507 经常反编译apk文件找资源,9.png的文件处理起来很麻烦。 最近使用Ant自动编译打包app时,从别处搜罗来的9.png文件导...

shzwork
11分钟前
2
0
Shell脚本应用 – for、while循环语句

一、for循环语句 在实际工作中,经常会遇到某项任务需要多次执行的情况,而每次执行时仅仅是处理的对象不一样,其他命令相同。例如:根据通讯录中的姓名列表创建系统账号等情况。 当面对各种...

linux-tao
11分钟前
2
0
RPA风潮下企业财务工作模式的变革

RPA(机器人流程自动化)在财务领域的应用,正给企业财务带来前所未有的改变。 前RPA时代,财务领域面临的痛点 在RPA机器人应用之前,企业财务工作进程的推进,主要通过财务人员人工操作或信...

UiBot
16分钟前
3
0
Hive之命令行修改表注释

最近遇到一个需求,在不重建表的情况下,修改表的注释,hive有没有类似关系型数据库的SQL命令来修改呢,找了下,亲测有效,如下List-1 List-1 hive>use your_schemahvie>ALTER TABLE tabl...

克虏伯
17分钟前
3
0
是什么,它的作用是什么

在HTML文档的首部往往会有这么一句话<!DOCTYPE html>,许多时候我们忽视了它的存在,它实际上是一个声明,告诉浏览器用哪种HTML版本的规范来解读HTML文档。 尽管我们不给出这句声明浏览器照样...

前端老手
22分钟前
3
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部