Linux

如何在 Red Hat 6.1 上安裝 MySql?

  • June 27, 2013

我正在嘗試MySQL-server-5.6.12-1.el6.i686.rpm在 Red Hat Enterprise 6.1 伺服器上安裝。

我收到以下錯誤:

rpm -Uvh MySQL-server-5.6.12-1.el6.i686.rpm
error: Failed dependencies:
       libaio.so.1 is needed by MySQL-server-5.6.12-1.el6.i686
       libaio.so.1(LIBAIO_0.1) is needed by MySQL-server-5.6.12-1.el6.i686
       libaio.so.1(LIBAIO_0.4) is needed by MySQL-server-5.6.12-1.el6.i686
       libc.so.6 is needed by MySQL-server-5.6.12-1.el6.i686
       libc.so.6(GLIBC_2.0) is needed by MySQL-server-5.6.12-1.el6.i686
       libc.so.6(GLIBC_2.1) is needed by MySQL-server-5.6.12-1.el6.i686
       libc.so.6(GLIBC_2.1.2) is needed by MySQL-server-5.6.12-1.el6.i686
       libc.so.6(GLIBC_2.1.3) is needed by MySQL-server-5.6.12-1.el6.i686
       libc.so.6(GLIBC_2.10) is needed by MySQL-server-5.6.12-1.el6.i686
       libc.so.6(GLIBC_2.2) is needed by MySQL-server-5.6.12-1.el6.i686
       libc.so.6(GLIBC_2.2.3) is needed by MySQL-server-5.6.12-1.el6.i686
       libc.so.6(GLIBC_2.3) is needed by MySQL-server-5.6.12-1.el6.i686
       libc.so.6(GLIBC_2.3.3) is needed by MySQL-server-5.6.12-1.el6.i686
       libc.so.6(GLIBC_2.3.4) is needed by MySQL-server-5.6.12-1.el6.i686
       libc.so.6(GLIBC_2.4) is needed by MySQL-server-5.6.12-1.el6.i686
       libc.so.6(GLIBC_2.7) is needed by MySQL-server-5.6.12-1.el6.i686
       libc.so.6(GLIBC_2.8) is needed by MySQL-server-5.6.12-1.el6.i686
       libcrypt.so.1 is needed by MySQL-server-5.6.12-1.el6.i686
       libcrypt.so.1(GLIBC_2.0) is needed by MySQL-server-5.6.12-1.el6.i686
       libdl.so.2 is needed by MySQL-server-5.6.12-1.el6.i686
       libdl.so.2(GLIBC_2.0) is needed by MySQL-server-5.6.12-1.el6.i686
       libdl.so.2(GLIBC_2.1) is needed by MySQL-server-5.6.12-1.el6.i686
       libgcc_s.so.1 is needed by MySQL-server-5.6.12-1.el6.i686
       libgcc_s.so.1(GCC_3.0) is needed by MySQL-server-5.6.12-1.el6.i686
       libgcc_s.so.1(GLIBC_2.0) is needed by MySQL-server-5.6.12-1.el6.i686
       libm.so.6 is needed by MySQL-server-5.6.12-1.el6.i686
       libm.so.6(GLIBC_2.0) is needed by MySQL-server-5.6.12-1.el6.i686
       libm.so.6(GLIBC_2.1) is needed by MySQL-server-5.6.12-1.el6.i686
       libpthread.so.0 is needed by MySQL-server-5.6.12-1.el6.i686
       libpthread.so.0(GLIBC_2.0) is needed by MySQL-server-5.6.12-1.el6.i686
       libpthread.so.0(GLIBC_2.1) is needed by MySQL-server-5.6.12-1.el6.i686
       libpthread.so.0(GLIBC_2.2) is needed by MySQL-server-5.6.12-1.el6.i686
       libpthread.so.0(GLIBC_2.3.2) is needed by MySQL-server-5.6.12-1.el6.i686
       librt.so.1 is needed by MySQL-server-5.6.12-1.el6.i686
       librt.so.1(GLIBC_2.2) is needed by MySQL-server-5.6.12-1.el6.i686
       libstdc++.so.6 is needed by MySQL-server-5.6.12-1.el6.i686
       libstdc++.so.6(CXXABI_1.3) is needed by MySQL-server-5.6.12-1.el6.i686
       libstdc++.so.6(GLIBCXX_3.4) is needed by MySQL-server-5.6.12-1.el6.i686
       libstdc++.so.6(GLIBCXX_3.4.11) is needed by MySQL-server-5.6.12-1.el6.i686

我知道這些是我需要安裝的程序。我的問題是我應該在哪裡下載這些程序來安裝,或者我應該只尋找舊版本的 MySQL?

編輯:最後它實際上是一個系統架構問題。在 linux 中安裝組件時,應始終牢記系統架構。當它是 x86_x64 系統時,我使用的是 i686 rpm

您可以使用更新版本的 MySQL 的 YUM rep,如下所示:http ://www.webtatic.com/packages/mysql55/

強烈建議使用您的發行版附帶的軟體包。RHEL 6.1 附帶 5.1.52,您應該使用它。

實際上 - 您應該考慮將機器更新到更高級別。

引用自:https://unix.stackexchange.com/questions/78631