2

I'm trying to install PHP on my server, running Centos 7.3; I've installed php 5.4, and have MySQL Server 5.6.28 running there too. When I'm trying to install php-mysql, it's trying to install mariadb-libs for dependencies, and it stops with errors:

# yum install php-mysql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.mirror.nac.net
 * extras: mirror.vcu.edu
 * updates: mirror.netdepot.com
Resolving Dependencies
--> Running transaction check
---> Package php-mysql.x86_64 0:5.4.16-42.el7 will be installed
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php-mysql-5.4.16-42.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php-mysql-5.4.16-42.el7.x86_64
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.52-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================
 Package                                                     Arch                                                  Version                                                          Repository                                           Size
==============================================================================================================================================================================================================================================
Installing:
 php-mysql                                                   x86_64                                                5.4.16-42.el7                                                    base                                                101 k
Installing for dependencies:
 mariadb-libs                                                x86_64                                                1:5.5.52-1.el7                                                   base                                                761 k

Transaction Summary
==============================================================================================================================================================================================================================================
Install  1 Package (+1 Dependent package)

When I proceed:

Transaction check error:
  file /usr/share/mysql/charsets/README from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/Index.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/armscii8.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/ascii.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/cp1250.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/cp1251.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/cp1256.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/cp1257.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/cp850.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/cp852.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/cp866.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/dec8.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/geostd8.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/greek.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/hebrew.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/hp8.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/keybcs2.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/koi8r.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/koi8u.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/latin1.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/latin2.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/latin5.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/latin7.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/macce.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/macroman.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/charsets/swe7.xml from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/czech/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/danish/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/dutch/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/english/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/estonian/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/french/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/german/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/greek/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/hungarian/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/italian/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/japanese/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/korean/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/norwegian/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/polish/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/portuguese/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/romanian/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/russian/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/serbian/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/slovak/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/spanish/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/swedish/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64
  file /usr/share/mysql/ukrainian/errmsg.sys from install of mariadb-libs-1:5.5.52-1.el7.x86_64 conflicts with file from package MySQL-server-5.6.28-1.el7.x86_64

Error Summary
-------------

Is there a way to install PHP without those libs... Or what can I do in order to install the package without uninstalling MySQL server, since it's where the DB for the site is running (This is a migration from another server).

UPDATE

I'm running MySQL Server:

# mysql -u root -h 127.0.0.1 -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.28-log MySQL Community Server (GPL)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

And there's no MariaDB installed:

# yum list mariadb*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.lga7.us.voxel.net
 * epel: mirror.es.its.nyu.edu
 * extras: mirror.netdepot.com
 * remi-safe: repo1.ash.innoscale.net
 * updates: mirror.netdepot.com
Available Packages
mariadb.x86_64                                                                                                              1:5.5.52-1.el7                                                                                                base
mariadb-bench.x86_64                                                                                                        1:5.5.52-1.el7                                                                                                base
mariadb-devel.i686                                                                                                          1:5.5.52-1.el7                                                                                                base
mariadb-devel.x86_64                                                                                                        1:5.5.52-1.el7                                                                                                base
mariadb-embedded.i686                                                                                                       1:5.5.52-1.el7                                                                                                base
mariadb-embedded.x86_64                                                                                                     1:5.5.52-1.el7                                                                                                base
mariadb-embedded-devel.i686                                                                                                 1:5.5.52-1.el7                                                                                                base
mariadb-embedded-devel.x86_64                                                                                               1:5.5.52-1.el7                                                                                                base
mariadb-libs.i686                                                                                                           1:5.5.52-1.el7                                                                                                base
mariadb-libs.x86_64                                                                                                         1:5.5.52-1.el7                                                                                                base
mariadb-server.x86_64                                                                                                       1:5.5.52-1.el7                                                                                                base
mariadb-test.x86_64                                                                                                         1:5.5.52-1.el7                                                                                                base
  • Are you sure you don't have `maraidb` installed, what does the command `mysql -u username -p` show you? – George Udosen May 15 '17 at 16:43
  • Again since it's migrated perhaps `mariadb` was used there! – George Udosen May 15 '17 at 16:45
  • I'm sure; it's only MySQL. I edited my question with stuff regarding this – Mauricio Cacho May 15 '17 at 17:36
  • Exactly the same issue here. Brand new Centos 7 install. I removed all mariadb references, I installed mysql, and is running fine. I installed php, anad is running fine. But I need to install php-mysql and I get the conflict error: Error: Package: php-mysql-5.4.16-42.el7.x86_64 (base) Requires: libmysqlclient.so.18()(64bit) Available: 1:mariadb-libs-5.5.52-1.el7.x86_64 (base) – smorhaim May 15 '17 at 18:52
  • @smorhaim I made it. My installation was with RPMs (MySQL Server and Client). So I also installed Compatibility Libraries and Shared components (https://dev.mysql.com/downloads/mysql/5.6.html?os=31). After that, I tried again the installation and didn't ask for mariadb-libs anymore. Hope it helps! – Mauricio Cacho May 15 '17 at 20:04
  • I gave up. Don't like going against the 'standard'. If Centos7 is no longer using MySQL and using MariaDB which appears to be identical in all regards to MySQL... well why not. I removed all Mysql instances, and installed mariadb-server, it all works now. Not really a solution to this problem, sort of a workaround. – smorhaim May 15 '17 at 21:51

1 Answers1

2

php-mysql use the mariadb client library (libmysqlclient)

php-mysqlnd use the MySQL Native Driver and provides the same set of extensions (mysql, mysqli and pdo_mysql), so don't have any dependency on the libmysqlclient.

See choosing a library

To switch from one installed package to the other, in yum expert mode

# yum shell
> remove php-mysql
> install php-mysqlnd
> run
> quit
Remi Collet
  • 2,061
  • 1
  • 11
  • 12