Solved

MySQL installation failed dependencies error

Posted on 2012-12-28
17
1,120 Views
Last Modified: 2013-01-15
when I tried to install MySQL-Server-5.5.29, the rpm gives me error like below, could you please give me some help, thank you.


[root@apollo downloaded]# ls
httpd-2.4.3  httpd-2.4.3.tar  MySQL-server-5.5.29-1.linux2.6.x86_64.rpm  php-5.4.10  php-5.4.10.tar
[root@apollo downloaded]# rpm -ivh MySQL-server-5.5.29-1.linux2.6.x86_64.rpm
error: Failed dependencies:
        mysql conflicts with MySQL-server-5.5.29-1.linux2.6.x86_64
        mysql-server conflicts with MySQL-server-5.5.29-1.linux2.6.x86_64
        MySQL conflicts with mysql-5.1.61-4.el6.x86_64
        MySQL-server conflicts with mysql-server-5.1.61-4.el6.x86_64
0
Comment
Question by:Jason Yu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 7
17 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 38728430
These are not dependency issues, they're version conflicts.

You already have mysql components installed, so use

rpm -Uvh MySQL-server-5.5.29-1.linux2.6.x86_64.rpm

This will update the installed version, instead of just trying to install it.
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 500 total points
ID: 38729007
Do you need more assistance on this? Any uncertainties?
0
 

Author Comment

by:Jason Yu
ID: 38729787
I used yum install php to install it. however after I finished this installation, it shows the edition is only 5.3.3. (i got this information through the info.php page). But my the web site developer asked me at least prepare 5.4 for him. I have to upgrade it again.

Which way I should take? Can I use the same command as you provided above? Since the present edition was installed by yum, I am not sure rpm repository would recognize it.

My question is how to upgrade it from here? ,thank you a lot.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 500 total points
ID: 38729797
yum uses rpm behind the scenes, so it's no problem running "rpm -U ...", for mysql, php or whatever.
0
 

Author Comment

by:Jason Yu
ID: 38729852
good, I will try it out this afternoon when I am vpn to office.

thanks and have a nice weekend.
0
 

Author Comment

by:Jason Yu
ID: 38737190
I tried to run the above command as you instructed, it gives me this prompt:


[root@apollo downloaded]# rpm -Uvh MySQL-server-5.5.29-1.linux2.6.x86_64.rpm
error: Failed dependencies:
        mysql conflicts with MySQL-server-5.5.29-1.linux2.6.x86_64
        mysql-server conflicts with MySQL-server-5.5.29-1.linux2.6.x86_64
        MySQL conflicts with mysql-5.1.66-2.el6_3.x86_64
        MySQL-server conflicts with mysql-server-5.1.66-2.el6_3.x86_64
[root@apollo downloaded]#
0
 

Author Comment

by:Jason Yu
ID: 38737217
Also, how to upgrade PHP version from 5.3.3 to 5.4.10. I downloaded php-5.4.10.tar. file and unzipped it. there is a folder there with the same name. The folder content is as follows:

[root@apollo php-5.4.10]# ls
acinclude.m4      configure        header         Makefile.gcov    php5.spec.in         README.MAILINGLIST_RULES          README.STREAMS             scripts                  TSRM
aclocal.m4        configure.in     INSTALL        Makefile.global  php.gif              README.namespaces                 README.SUBMITTING_PATCH    server-tests-config.php  UPGRADING
build             CREDITS          install-sh     makerpm          php.ini-development  README.NEW-OUTPUT-API             README.TESTING             server-tests.php         UPGRADING.INTERNALS
buildconf         ext              LICENSE        missing          php.ini-production   README.PARAMETER_PARSING_API      README.TESTING2            snapshot                 vcsclean
buildconf.bat     EXTENSIONS       ltmain.sh      mkinstalldirs    README.EXTENSIONS    README.PHP4-TO-PHP5-THIN-CHANGES  README.UNIX-BUILD-SYSTEM   stamp-h.in               win32
CODING_STANDARDS  footer           main           netware          README.EXT_SKEL      README.REDIST.BINS                README.WIN32-BUILD-SYSTEM  stub.c                   Zend
config.guess      generated_lists  makedist       NEWS             README.GIT-RULES     README.RELEASE_PROCESS            run-tests.php              svnclean.bat
config.sub        genfiles         Makefile.frag  pear             README.input_filter  README.SELF-CONTAINED-EXTENSIONS  sapi                       tests
[root@apollo php-5.4.10]#
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 500 total points
ID: 38737221
OK, seems you're trying to install a MySQL distribution different from the one you installed before.

So uninstall the previous version first.

rpm -e mysql-5.1.66-2.el6_3.x86_64
rpm -e mysql-server-5.1.66-2.el6_3.x86_64

Then run

rpm -ivh MySQL-server-5.5.29-1.linux2.6.x86_64.rpm

As for PHP - you downloaded the source tarball, which is meant to be compiled and linked by yourself.
Is this what you desire?
I'd rather suggest downloading and installing the appropriate RPM (binary) package.
0
 

Author Comment

by:Jason Yu
ID: 38737273
thanks a lot, I will download the RPM package for PHP. Whichone should I run first to upgrade?

The developer is very annoying, he asked me to install these things exact the same version as he provided. I don't think there are lots of difference between versions.

thanks a lot.
0
 

Author Comment

by:Jason Yu
ID: 38737281
After I upgrade, will it be working automatically or I need reconfigure it manually. I am not very good at LAMP setup, so kind of worry about it. thank you.
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 500 total points
ID: 38737323
All paths should remain the same, but I'm not sure about config files.

Save the following configs before uninstalling, and restore them afterwards if necessary.

MySQL:

/etc/my.cnf
datadir/my.cnf

where datadir is the data directory of MySQL, by default /usr/local/mysql/data

PHP:

php.ini, in /etc, /usr/local/lib, /etc/httpd/... or your public html directory.
0
 

Author Comment

by:Jason Yu
ID: 38737391
Hi, woolmilkporc:

Could you help me find an RPM package for PHP 5.4 or above? I plan to upgrade PHP first then MySQL. Thank you very much.
0
 

Author Comment

by:Jason Yu
ID: 38737402
I got an article here: http://www.tecmint.com/install-apache-mysql-php-on-redhat-centos-fedora/

But I've already installed all the modules, just need to upgrade two of them, Do I need still follow this procedure, thank you.
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 500 total points
ID: 38737527
PHP RPMs for Fedora are e.g. here:

FC19: http://www.rpmfind.net//linux/RPM/fedora/devel/rawhide/x86_64/p/php-5.4.10-1.fc19.x86_64.html

FC18: http://www.rpmfind.net//linux/RPM/fedora/updates/testing/18/x86_64/php-5.4.10-1.fc18.x86_64.html

I don't know which Linux distro you're on, so have a look at the full list:

http://www.rpmfind.net/linux/rpm2html/search.php?query=php&submit=Search+...&system=&arch=

The procedure descriobed in your link is meant to install everything from scratch.

Of course you could uninstall not only MySQL but also PHP and Apache first to then follow the mentioned procedure. You will get Apache, MySQL 5.5.28 and PHP 5.4.10 and all required modules from Rémi Collet's repository, which is just OK.

Following the procedure you will end up with a consistent, up-to-date installation, so I think it's not a bad idea following it.

If you get "already installed" messages for modules you didn't uninstall try "yum reinstall" instead of "yum install", or remove them first by means of "rpm -e ..." or better "yum remove ...".
0
 

Author Comment

by:Jason Yu
ID: 38738440
hi, woolmilkporc:

Got all three parts re-installed, they are working perfectly.

I first uninstalled all modules then follow that article to install Rémi Collet's repository.

BTW, what does Remi collet's mean, is it a name? And also what does repository mean?

thanks.
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 500 total points
ID: 38739322
Rémi Collet is the name of a french guy who works on maintaining PHP and MySQL distributions.
His main goal is keeping the package collections consistent and much more up to date than the standard ones.

A repository is a collection of packages suitable for download and installation by a particular package management utility.

http://en.wikipedia.org/wiki/Software_repository

Your package management utility is YUM, and Rémi Collet's collection is a YUM repository.

YUM = Yellowdog Updater, Modified

http://en.wikipedia.org/wiki/Yellowdog_Updater,_Modified
0
 

Author Comment

by:Jason Yu
ID: 38780311
got this solved, thank  you.
0

Featured Post

Containers & Docker to Create a Powerful Team

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the most frequently asked questions on EE in the "Windows Installer" zone is how to eliminate self-triggered installation of some product.  The problem occurs when, suddenly, whenever a certain application is launched, or even when a folder i…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question