繁体   English   中英

无法在Centos上安装php-mysqli扩展

[英]Cannot install php-mysqli extension on Centos

我正在尝试将mysqli扩展安装到php

yum install php-mysqli

而且我得到了下一个错误

...
     Transaction Check Error:
          file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.71-1.el6.x86_64 conflicts with file from package MySQL55-server-5.5.34-2.cp1136.x86_64
          file /usr/share/mysql/charsets/README from install of mysql-libs-5.1.71-1.el6.x86_64 conflicts with file from package MySQL55-server-5.5.34-2.cp1136.x86_64
          file /usr/share/mysql/charsets/armscii8.xml from install of mysql-libs-5.1.71-1.el6.x86_64 conflicts with file from package MySQL55-server-5.5.34-2.cp1136.x86_64
          file /usr/share/mysql/charsets/ascii.xml from install of mysql-libs-5.1.71-1.el6.x86_64 conflicts with file from package MySQL55-server-5.5.34-2.cp1136.x86_64
          file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.1.71-1.el6.x86_64 conflicts with file from package MySQL55-server-5.5.34-2.cp1136.x86_64
          file /usr/share/mysql/charsets/cp1251.xml from install of mysql-libs-5.1.71-

...

(日志继续)

我没有安装mysqli包,因为我可以检查

php -m | grep mysqli

它什么都不返回......

最后,我在WHM中使用EasyApache重新编译了apache,在“穷举选项列表”中选择了MySQLi选项

CentOS 6.5 64位

1-找到mysqli

/usr/lib64/php/modules/mysqli.so

2-编辑php.ini添加

extension=pathroyourfile

3-重启apache

我终于找到了任何一个可能与php7有相同问题但没有mysqli的答案!

  1. 去找EasyApache 4
  2. 然后尝试自定义(或重新编译)一个新包
  3. 选择你想要的php版本(你可以选择多个)
  4. 转到名为“PHP EXTENSIONS”的步骤
  5. (这是有趣的部分)从顶部搜索字段中搜索php-mysqlnd,它可能会找到一对但是如果你看到已经安装了一部分就不要被愚弄,根据你的php版本来看其他人我选择了所有可用的4个包括这一个ea-php71-php-mysqlnd。
  6. 现在最后一步是审查,构建或者它被称为什么!

如果你得到这样的更新错误:更新错误:错误:ea-apache24-mod_cgi与ea-apache24-mod_cgid-2.4.23-2.2.2.cpanel.x86_64冲突

解决方案:从root运行此命令:yum remove ea-php54-php ea-php54-php-debuginfo ea-php55-php ea-php55-php-debuginfo

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM