Failed dependencies errors while installing MySQL on CentOS Linux

18,576

Solution 1

Try the following command:

yum install mysql-server

Then start it by trying one of these:

/sbin/service mysql start
/sbin/service mysqld start

Solution 2

After a similar error, I figured out what your problem was (and had a big "durrrr" on my side, as I was building from SRPM in the background):

When using the packages from mysql.com, be certain that you're downloading the correct version for your platform (32-bit or 64-bit), including all of the supplemental packages. MySQL Oracle has a terrible webpage layout, and it's easy to mix things up.

To install the dependency for either architecture:

yum install libaio

or if you need 32-bit MySQL on the 64-bit architecture:

yum install libaio.686

You could always install the in-distro packages (as discussed above), but this is a direct response to your original issue. I think it's pretty easy to mix up downloads on that site.

Share:
18,576

Related videos on Youtube

Aamir Rind
Author by

Aamir Rind

Passionate Python/Django Developer. Contact me on LinkedIn.

Updated on September 18, 2022

Comments

  • Aamir Rind
    Aamir Rind over 1 year

    I am trying to install MySQL on Linux. And it seems that I'm confused which MySQL package I should use for my particular Linux environment.

    My Linux Details:

    Linux 2.6.32-71.el6.x86_64 #1 SMP Fri May 20 03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux
    CentOS Linux release 6.0 (Final)
    

    So I went for MySQL package MySQL-server-5.5.20-1.linux2.6.x86_64.rpm (download from here). I choose Linux-Generic from dropdown. But when I try to install it I got this error:

    error: Failed dependencies:
        libaio.so.1()(64bit) is needed by MySQL-server-5.5.20-1.linux2.6.x86_64
        libaio.so.1(LIBAIO_0.1)(64bit) is needed by MySQL-server-5.5.20-1.linux2.6.x86_64
        libaio.so.1(LIBAIO_0.4)(64bit) is needed by MySQL-server-5.5.20-1.linux2.6.x86_64
    

    I got more failed dependencies errors when I choose MySQL-server-5.5.20-1.linux2.6.i386.rpm. So both are not working.

    • fyr
      fyr about 12 years
      Which distribution do you use ?
    • Admin
      Admin about 12 years
      If it's something from RH or CentOS you should use yum to install packages it will resolve your dependencies.
    • Admin
      Admin about 12 years
      Tell your distro
    • Admin
      Admin about 12 years
      its CentOS Linux release 6.0 (Final).
    • Admin
      Admin about 12 years
      Ok i used yum to install. After installation when i issue mysql command i got this error ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
    • Admin
      Admin about 12 years
      it means it hasnt started it's another question. did you create the database? did you start it?
  • Admin
    Admin about 12 years
    Ok i used yum to install. After installation when i issue mysql command i got this error ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
  • nos
    nos about 12 years
    Did you start the server after installing it ? /sbin/service mysql start , or /sbin/service mysqld start