文档章节

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

小致Daddy
 小致Daddy
发布于 2016/09/14 09:15
字数 1262
阅读 2942
收藏 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

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

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

楠木楠
2016/09/14
2.6K
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

没有更多内容

加载失败,请刷新页面

加载更多

Spring Boot WebFlux 增删改查完整实战 demo

03:WebFlux Web CRUD 实践 前言 上一篇基于功能性端点去创建一个简单服务,实现了 Hello 。这一篇用 Spring Boot WebFlux 的注解控制层技术创建一个 CRUD WebFlux 应用,让开发更方便。这里...

泥瓦匠BYSocket
26分钟前
5
0
从0开始学FreeRTOS-(列表与列表项)-3

FreeRTOS列表&列表项的源码解读 第一次看列表与列表项的时候,感觉很像是链表,虽然我自己的链表也不太会,但是就是感觉很像。 在FreeRTOS中,列表与列表项使用得非常多,是FreeRTOS的一个数...

杰杰1号
29分钟前
4
0
Java反射

Java 反射 反射是框架设计的灵魂(使用的前提条件:必须先得到代表的字节码的 Class,Class 类 用于表示.class 文件(字节码)) 一、反射的概述 定义:JAVA 反射机制是在运行状态中,对于任...

zzz1122334
55分钟前
4
0
聊聊nacos的LocalConfigInfoProcessor

序 本文主要研究一下nacos的LocalConfigInfoProcessor LocalConfigInfoProcessor nacos-1.1.3/client/src/main/java/com/alibaba/nacos/client/config/impl/LocalConfigInfoProcessor.java p......

go4it
昨天
7
0
前端技术之:webpack热模块替换(HMR)

第一步:安装HMR中间件: npm install --save-dev webpack-hot-middleware 第二步:webpack配置中引入webpack对象 const webpack = require('webpack’); 第三步:增加devServer配置项: ho......

popgis
昨天
6
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部