Mysql

在 RedHat Linux 上安裝 MySQL 時出錯

  • February 8, 2016

我是 RedHat Linux 的新手,我指的是安裝連結:https ://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/linux-installation-yum-repo.html我完成了前兩個步驟,當我嘗試執行第 3 步時,出現以下錯誤:

Loaded plugins: refresh-packagekit, rhnplugin, security
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-server.x86_64 0:5.7.10-2.el6 will be installed
--> Processing Dependency: mysql-community-common(x86-64) = 5.7.10-2.el6 for package: mysql-community-server-5.7.10-2.el6.x86_64
--> Processing Dependency: mysql-community-client(x86-64) = 5.7.10-2.el6 for package: mysql-community-server-5.7.10-2.el6.x86_64
--> Running transaction check
---> Package mysql-community-client.x86_64 0:5.7.10-2.el6 will be installed
--> Processing Dependency: mysql-community-libs(x86-64) = 5.7.10-2.el6 for package: mysql-community-client-5.7.10-2.el6.x86_64
---> Package mysql-community-common.x86_64 0:5.7.10-2.el6 will be installed
--> Running transaction check
---> Package mysql-community-libs.x86_64 0:5.7.10-2.el6 will be obsoleting
---> Package mysql-libs.x86_64 0:5.5.47-1.el6.remi will be obsoleted
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php-mysql-5.4.45-3.el6.remi.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_16)(64bit) for package: php-mysql-5.4.45-3.el6.remi.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php-mysql-5.4.45-3.el6.remi.x86_64
--> Finished Dependency Resolution
Error: Package: php-mysql-5.4.45-3.el6.remi.x86_64 (@remi)
          Requires: libmysqlclient.so.18()(64bit)
          Removing: mysql-libs-5.5.47-1.el6.remi.x86_64 (@remi)
              libmysqlclient.so.18()(64bit)
          Obsoleted By: mysql-community-libs-5.7.10-2.el6.x86_64 (mysql57-community)
              Not found
Error: Package: php-mysql-5.4.45-3.el6.remi.x86_64 (@remi)
          Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit)
          Removing: mysql-libs-5.5.47-1.el6.remi.x86_64 (@remi)
              libmysqlclient.so.18(libmysqlclient_18)(64bit)
          Obsoleted By: mysql-community-libs-5.7.10-2.el6.x86_64 (mysql57-community)
              Not found
Error: Package: php-mysql-5.4.45-3.el6.remi.x86_64 (@remi)
          Requires: libmysqlclient.so.18(libmysqlclient_16)(64bit)
          Removing: mysql-libs-5.5.47-1.el6.remi.x86_64 (@remi)
              libmysqlclient.so.18(libmysqlclient_16)(64bit)
          Obsoleted By: mysql-community-libs-5.7.10-2.el6.x86_64 (mysql57-community)
              Not foundenter code here
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

我會建議從php-mysql遷移到php-mysqlnd(它提供相同的擴展集:mysql、mysqli 和 pdo_mysql),從而擺脫對 libmysqlclient 的依賴:

# yum shell --enablerepo=remi
> remove php-mysql
> install php-mysqlnd
> run

注意:PHP 5.4 現已停產,我也建議升級到 5.5 或 5.6。並且 5.4 也是最後一個提供 php-mysql 的版本,較新的 RPM 版本只有 php-mysqlnd。

嘗試從 epel 儲存庫安裝 mysql。 http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ 之後安裝 LAMP。

引用自:https://dba.stackexchange.com/questions/127907