Я пытаюсь установить PHP на свой сервер под управлением Centos 7.3; Я установил php 5.4 и там тоже работает MySQL Server 5.6.28. Когда я пытаюсь установить php-mysql, он пытается установить mariadb-libs для зависимостей и останавливается с ошибками:
# 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)
Когда я продолжу:
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
-------------
Есть ли способ установить PHP без этих библиотек ... Или что я могу сделать, чтобы установить пакет без удаления сервера MySQL, поскольку там работает БД для сайта (это миграция с другого сервера).
ОБНОВИТЬ
Я использую 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>
И MariaDB не установлен:
# 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
php-mysql использовать клиентскую библиотеку mariadb (libmysqlclient)
php-mysqlnd использовать собственный драйвер MySQL и предоставляет тот же набор расширений (mysql, mysqli и pdo_mysql), поэтому не зависите от libmysqlclient.
Видеть выбор библиотеки
Чтобы переключиться с одного установленного пакета на другой, в экспертном режиме yum
# yum shell
> remove php-mysql
> install php-mysqlnd
> run
> quit