我试图从我下载的RPM软件包安装MySQL 5.6社区版。我正在运行cloudera的CDH 4.5虚拟机,即CentOS 6.4。 VM安装了MySQL 5.1.73,旧版本的文件似乎阻止我更新。
我已经这样做了:
sudo yum remove mysql
并且工作正常,没有问题。然后我删除了/ usr / lib / mysql中的所有内容,也就是数据目录。所以我尝试安装新版本:
[cloudera@localhost mysql]$ pwd
/home/cloudera/mysql
[cloudera@localhost mysql]$ ll
total 302660
-rw-r--r-- 1 cloudera cloudera 23080383 Mar 17 02:39 MySQL-client-5.6.17-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 cloudera cloudera 4573735 Mar 17 02:40 MySQL-devel-5.6.17-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 cloudera cloudera 114192347 Mar 17 02:40 MySQL-embedded-5.6.17-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 cloudera cloudera 86961692 Mar 17 02:41 MySQL-server-5.6.17-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 cloudera cloudera 2398671 Mar 17 02:41 MySQL-shared-5.6.17-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 cloudera cloudera 5180653 Mar 17 02:41 MySQL-shared-compat-5.6.17-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 cloudera cloudera 73530987 Mar 17 02:42 MySQL-test-5.6.17-1.linux_glibc2.5.x86_64.rpm
[cloudera@localhost mysql]$ sudo yum install MySQL-server-5.6.17-1.linux_glibc2.5.x86_64.rpm
.....
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Check Error:
file /usr/share/mysql/charsets/README from install of MySQL-server-5.6.17-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.73-3.el6_5.x86_64
file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.6.17-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.73-3.el6_5.x86_64
......
所以看起来旧的安装阻止了我,我试图删除mysql-libs但是......
[cloudera@localhost mysql]$ sudo yum remove mysql-libs
.....
pig noarch 0.11.0+33-1.cdh4.4.0.p0.14.el6 @cloudera-cdh4 120 M
postfix x86_64 2:2.6.6-2.2.el6_1 @anaconda-CentOS-201112091719.x86_64/6.2 9.7 M
redhat-lsb x86_64 4.0-7.el6.centos @base 0.0
redhat-lsb-compat x86_64 4.0-7.el6.centos @base 0.0
redhat-lsb-core x86_64 4.0-7.el6.centos @base 22 k
redhat-lsb-graphics x86_64 4.0-7.el6.centos @base 0.0
redhat-lsb-printing x86_64 4.0-7.el6.centos @base 0.0
solr noarch 4.4.0+69-1.cdh4.3.0.p0.4.el6 @cloudera-search 66 M
solr-mapreduce noarch 1.0.0-1.cdh4.3.0.p0.5.el6 @cloudera-search 55 M
sqoop noarch 1.4.3+62-1.cdh4.4.0.p0.15.el6 @cloudera-cdh4 7.7 M
sqoop2 noarch 1.99.2+85-1.cdh4.4.0.p0.62.el6 @cloudera-cdh4 7.8 M
sysstat x86_64 9.0.4-20.el6 @base 807 k
tomcat noarch 7.0.33-3.el6 @epel 303 k
Transaction Summary
=============================================================================================================================================================================================
Remove 67 Package(s)
它列出了许多依赖于mysql-libs的主要软件。我不想重新安装tomcat,pig,hive,mahout,hue,oozie,flume和cloudera manager。我之前和之合作过,我知道他们是正确安装和配置的NIGHTMARE,所以我真的不想卸载它们。
所以我想也许我应该尝试更新,
[cloudera@localhost mysql]$ sudo yum update MySQL-server-5.6.17-1.linux_glibc2.5.x86_64.rpm
....
Examining MySQL-server-5.6.17-1.linux_glibc2.5.x86_64.rpm: MySQL-server-5.6.17-1.linux_glibc2.5.x86_64
Package MySQL-server not installed, cannot update it. Run yum install to install it instead.
No Packages marked for Update
它不会让我更新它,因为我已经将其删除了。
有人请告诉我如何从这些RPM安装MySQL而不卸载其他所有内容吗?
答案 0 :(得分:0)
尝试安装shared-compat
个软件包,因为您可以看到here。
答案 1 :(得分:0)
我只是想为其他遇到此问题的人重新写下答案。
我会将acfrai的答案标记为正确,以便给予他信任,他帮助我了解了这些信息。