博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Centos下面mysql安装:warning: MySQL-server-5.6.10-1.lin
阅读量:7243 次
发布时间:2019-06-29

本文共 3482 字,大约阅读时间需要 11 分钟。

  hot3.png

前期准备工作:
    首先在http://www.mysql.com/downloads/mysql/里面下载两个文件,
    (1)MySQL-server-5.6.10-1.linux_glibc2.5.i386.rpm
    (2)MySQL-client-5.6.10-1.linux_glibc2.5.x86_64.rpm
先来说下rpm这个格式:
     rpm文件是Red Hat公司开发的软件安装包,rpm可让Linux在安装软件包时免除许多复杂的手续。该命令在安装时常用的参数是 –ivh ,其中i表示将安装指定的rmp软件包,V表示安装时的详细信息,h表示在安装期间出现“#”符号来显示目前的安装过程。这个符号将持续到安装完成后才停 止。 
 
完后进入到自己的虚拟机操作,这里提下Vmware tool这个安装了以后可以在虚拟机和主机之间直接复制粘贴文件,很好用。
 
下面是在虚拟机上的操作:
 
[root root]# cd /anzhuang
[root anzhuang]# ls -al
总用量 108376
drwxr-xr-x    2 root     root         4096  4月 12 16:58 .
drwxr-xr-x   23 root     root         4096  4月 12 16:57 ..
-rw-r--r--    1 root     root     22970964  4月 12 16:58 MySQL-client-5.6.10-1.linux_glibc2.5.x86_64.rpm
-rw-r--r--    1 root     root     87875484  4月 12 16:58 MySQL-server-5.6.10-1.linux_glibc2.5.i386.rpm
[root anzhuang]# rpm -ivh MySQL-server-5.6.10-1.linux_glibc2.5.i386.rpm
warning: MySQL-server-5.6.10-1.linux_glibc2.5.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
error: Failed dependencies:
        libc.so.6(GLIBC_2.3.4) is needed by MySQL-server-5.6.10-1.linux_glibc2.5        libc.so.6(GLIBC_2.4) is needed by MySQL-server-5.6.10-1.linux_glibc2.5
        libstdc++.so.6 is needed by MySQL-server-5.6.10-1.linux_glibc2.5
        libstdc++.so.6(CXXABI_1.3) is needed by MySQL-server-5.6.10-1.linux_glibc2.5
        libstdc++.so.6(GLIBCXX_3.4) is needed by MySQL-server-5.6.10-1.linux_glibc2.5
        rtld(GNU_HASH) is needed by MySQL-server-5.6.10-1.linux_glibc2.5
        mysql conflicts with MySQL-server-5.6.10-1.linux_glibc2.5
        mysql-server conflicts with MySQL-server-5.6.10-1.linux_glibc2.5
 
运行后发现报错了,网上查了下,估计是以前自带了mysql,已经安装好了的。
 
查看了下确实发现里面有
[root anzhuang]# rpm -qa |grep -i mysql
mysql-devel-3.23.54a-11
perl-DBD-MySQL-2.1021-3
php-mysql-4.2.2-17
libdbi-dbd-mysql-0.6.5-5
mysql-server-3.23.54a-11
mysql-3.23.54a-11
MySQL-python-0.9.1-6
qt-MySQL-3.1.1-6
mod_auth_mysql-1.11-12
 
里面出现了
mysql-server-3.23.54a-11   说明存在的
所以先删除
[root anzhuang]# rpm -ev mysql-server-3.23.54a-11
 
后面发现还是不行,又查资料,发现可以在后面加两个参数--nodeps --force
 
[root@localhost anzhuang]# rpm -ivh MySQL-server-5.6.10-1.linux_glibc2.5.i386.rpm
warning: MySQL-server-5.6.10-1.linux_glibc2.5.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
error: Failed dependencies:
        libc.so.6(GLIBC_2.3.4) is needed by MySQL-server-5.6.10-1.linux_glibc2.5        libc.so.6(GLIBC_2.4) is needed by MySQL-server-5.6.10-1.linux_glibc2.5
        libstdc++.so.6 is needed by MySQL-server-5.6.10-1.linux_glibc2.5
        libstdc++.so.6(CXXABI_1.3) is needed by MySQL-server-5.6.10-1.linux_glibc2.5
        libstdc++.so.6(GLIBCXX_3.4) is needed by MySQL-server-5.6.10-1.linux_glibc2.5
        rtld(GNU_HASH) is needed by MySQL-server-5.6.10-1.linux_glibc2.5
        mysql conflicts with MySQL-server-5.6.10-1.linux_glibc2.5
 
[root@localhost anzhuang]# rpm -ivh MySQL-server-5.6.10-1.linux_glibc2.5.i386.rpm -nodeps --force
-nodeps: unknown option
[root@localhost anzhuang]# rpm -ivh MySQL-server-5.6.10-1.linux_glibc2.5.i386.rpm --nodeps --force
warning: MySQL-server-5.6.10-1.linux_glibc2.5.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing...                ########################################### [100%]
You have more than one PID file:
ls: /var/lib/mysql/*.pid: 没有那个文件或目录
Please check which one (if any) corresponds to a running server
and delete all others before repeating the MySQL upgrade.
error: %pre(MySQL-server-5.6.10-1.linux_glibc2.5) scriptlet failed, exit status
1
error:   install: %pre scriptlet failed (2), skipping MySQL-server-5.6.10-1.linux_glibc2.5
 
 
加上那两个参数的意义就在于,
安装时不再分析包之间的依赖关系而直接安装,
也就不会再提示error: Failed dependencies:这样的错误了。
OK 先到这里,可能自己理解的不正确,后面继续学习哈哈。

转载于:https://my.oschina.net/liting/blog/362037

你可能感兴趣的文章
Spark入门实战系列--10.分布式内存文件系统Tachyon介绍及安装部署
查看>>
Uri详解之——Uri结构与代码提取
查看>>
【树莓派】树莓派配置无线网络访问
查看>>
灰尘是电脑的隐形杀手 最后才发现是主板积满灰尘惹的祸。因此,定期给爱机做卫生显得格外重要...
查看>>
reachability ios网络连接判断
查看>>
批量导入Exchange邮箱用户头像
查看>>
if/while/for 、解决数学难题 、 Python实例
查看>>
elasticsearch 近义词-远程配置
查看>>
Linux学习之CentOS(二十五)--Linux磁盘管理:LVM逻辑卷基本概念及LVM的工作原理
查看>>
PHP系列(七)PHP错误异常处理
查看>>
活动目录之迁移(转载,仅供学习)
查看>>
命令模式
查看>>
理解NAT中四类地址的含义
查看>>
计算两个时间差的两个函数
查看>>
如何自学人工智能?
查看>>
话说Windows 2003的安全
查看>>
unit 2
查看>>
编译安装Redis Stable最新版本
查看>>
LVM逻辑卷的快照
查看>>
php变量的几种写法
查看>>