运行yum install php-mysql Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * remi-safe: mirrors.tuna.tsinghua.edu.cn Resolving Dependencies --> Running transaction check ---> Package php-mysql.x86_64 0:5.4.16-48.1.al7 will be installed --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php-mysql-5.4.16-48.1.al7.x86_64 --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php-mysql-5.4.16-48.1.al7.x86_64 --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.65-1.1.al7 will be installed Removing mariadb-libs.x86_64 1:5.5.65-1.1.al7 - u due to obsoletes from installed mysql-community-libs-5.7.30-1.el7.x86_64 --> Restarting Dependency Resolution with new changes. --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.65-1.1.al7 will be installed --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-9.1.al7.x86_64 --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php-mysql-5.4.16-48.1.al7.x86_64 --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-9.1.al7.x86_64 --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php-mysql-5.4.16-48.1.al7.x86_64 --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.64-1.1.al7 will be installed ---> Package mariadb-libs.x86_64 1:5.5.65-1.1.al7 will be installed Removing mariadb-libs.x86_64 1:5.5.64-1.1.al7 - u due to obsoletes from installed mysql-community-libs-5.7.30-1.el7.x86_64 --> Restarting Dependency Resolution with new changes. --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.64-1.1.al7 will be installed --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-9.1.al7.x86_64 --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php-mysql-5.4.16-48.1.al7.x86_64 --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-9.1.al7.x86_64 --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php-mysql-5.4.16-48.1.al7.x86_64 --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.60-1.1.al7 will be installed ---> Package mariadb-libs.x86_64 1:5.5.64-1.1.al7 will be installed Removing mariadb-libs.x86_64 1:5.5.60-1.1.al7 - u due to obsoletes from installed mysql-community-libs-5.7.30-1.el7.x86_64 --> Restarting Dependency Resolution with new changes. --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.60-1.1.al7 will be installed --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-9.1.al7.x86_64 --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php-mysql-5.4.16-48.1.al7.x86_64 --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-9.1.al7.x86_64 --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php-mysql-5.4.16-48.1.al7.x86_64 --> Finished Dependency Resolution Error: Package: 2:postfix-2.10.1-9.1.al7.x86_64 (@updates) Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit) Available: 1:mariadb-libs-5.5.60-1.1.al7.x86_64 (base) libmysqlclient.so.18(libmysqlclient_18)(64bit) Available: 1:mariadb-libs-5.5.64-1.1.al7.x86_64 (updates) libmysqlclient.so.18(libmysqlclient_18)(64bit) Available: 1:mariadb-libs-5.5.65-1.1.al7.i686 (updates) Not found Error: Package: 2:postfix-2.10.1-9.1.al7.x86_64 (@updates) Requires: libmysqlclient.so.18()(64bit) Available: 1:mariadb-libs-5.5.60-1.1.al7.x86_64 (base) libmysqlclient.so.18()(64bit) Available: 1:mariadb-libs-5.5.64-1.1.al7.x86_64 (updates) libmysqlclient.so.18()(64bit) Available: 1:mariadb-libs-5.5.65-1.1.al7.i686 (updates) Not found Error: Package: 2:postfix-2.10.1-9.1.al7.x86_64 (@updates) Requires: libmysqlclient.so.18()(64bit) Installing: 1:mariadb-libs-5.5.60-1.1.al7.x86_64 (base) libmysqlclient.so.18()(64bit) Available: 1:mariadb-libs-5.5.64-1.1.al7.x86_64 (updates) libmysqlclient.so.18()(64bit) Available: 1:mariadb-libs-5.5.65-1.1.al7.i686 (updates) Not found Error: Package: php-mysql-5.4.16-48.1.al7.x86_64 (updates) Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit) Available: 1:mariadb-libs-5.5.60-1.1.al7.x86_64 (base) libmysqlclient.so.18(libmysqlclient_18)(64bit) Available: 1:mariadb-libs-5.5.64-1.1.al7.x86_64 (updates) libmysqlclient.so.18(libmysqlclient_18)(64bit) Available: 1:mariadb-libs-5.5.65-1.1.al7.i686 (updates) Not found Error: Package: 2:postfix-2.10.1-9.1.al7.x86_64 (@updates) Requires: libmysqlclient.so.18()(64bit) Available: 1:mariadb-libs-5.5.60-1.1.al7.x86_64 (base) libmysqlclient.so.18()(64bit) Installing: 1:mariadb-libs-5.5.64-1.1.al7.x86_64 (updates) libmysqlclient.so.18()(64bit) Available: 1:mariadb-libs-5.5.65-1.1.al7.i686 (updates) Not found Error: Package: php-mysql-5.4.16-48.1.al7.x86_64 (updates) Requires: libmysqlclient.so.18()(64bit) Available: 1:mariadb-libs-5.5.60-1.1.al7.x86_64 (base) libmysqlclient.so.18()(64bit) Available: 1:mariadb-libs-5.5.64-1.1.al7.x86_64 (updates) libmysqlclient.so.18()(64bit) Available: 1:mariadb-libs-5.5.65-1.1.al7.i686 (updates) Not found You could try using --skip-broken to work around the problem ** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows: 2:postfix-2.10.1-9.1.al7.x86_64 has missing requires of libmysqlclient.so.18()(64bit) 2:postfix-2.10.1-9.1.al7.x86_64 has missing requires of libmysqlclient.so.18(libmysqlclient_18)(64bit)
本人装的mysql不是mariadb 求大佬解惑
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-shared-compat-5.6.14-1.el6.x86_64.rpm
然后使用rpm -ivh MySQL-shared-compat-5.6.14-1.el6.x86_64.rpm,最后yum install php-mysql,重启apache,成功。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。