Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
564 views
in Technique[技术] by (71.8m points)

Why can't I uninstall mysql-5.5 & install mysql-5.6 on Amazon Linux machine?

I'm on a 64-bit Amazon Linux machine.

I had previously installed mysql-server 5.5. (using sudo yum install) However, I soon found out that my application requires MySql-serve 5.6.

So I uninstalled mysql-server 5.5. (using sudo yum remove mysql-server) and now I'm following these instruction to install mysql-server 5.6.

But I'm running into a problem.

when I try to do the second install, I get the following 2 errors:

file /usr/lib64/mysql/libmysqlclient.so.18 from install of mysql-community-libs-5.6.14-3.el6.x86_64 conflicts with file from package mysql55-libs-5.5.46-1.10.amzn1.x86_64
file /etc/my.cnf from install of mysql-community-server-5.6.14-3.el6.x86_64 conflicts with file from package mysql-config-5.5.46-1.10.amzn1.x86_64

Why on earth am I getting these two errors? How do I fix them? I removed mysql-server-5.5, so why is it conflicting with 5.6?

I did ls on /etc/my.cnf and /usr/lib64/mysql/libmysqlclient.so.18 and the files don't even exist!! If the files don't exist how can they be conflicting with other files?? Who can help explain this?

PS, I tried @msknapp's explanation here: Can't install MySQL 5.6 by RPM, however I don't know what to do after step #1 to install the rpm. I think that step is left unstated.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

mysql-server (of whatever version) depends on other packages ( in your case mysql-community-libs mysql-community-server)

When it is installed in the first place with the old version this stuff is installed. When you "uninstall" mysql-server these dependencies are NOT removed.

When you try and install the new version these still existing packages will conflict with the new package. It does not matter if the actual files in the package are there, it is the package and it's listing of what to expect that conflicts.

To resolve your problem figure out what the dependencies of mysql-server were and uninstall them before attemping the install.

This answer https://superuser.com/questions/294662/how-to-get-list-of-dependencies-of-non-installed-rpm-package may be of interest for working out what mysql-server depends on


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...