您的PHP安装不支持Centos6.7中的XML

时间:2016-01-06 04:28:49

标签: php xml

我已经在PHP5.6.16中安装了Centos6.7并且我已经配置虚拟主机(Vhosts)来创建另一个网站。但是我使用了CI2.2.0

但最后我收到了以下信息

的错误

遇到错误

您的PHP安装不支持XML

那么什么是PHP扩展来解决这个问题?

我已安装为bellow包

Install       1 Package(s)
Upgrade       8 Package(s)

Total download size: 9.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/9): php-5.6.16-1.el6.remi.x86_64.rpm                                                                                                                                 | 2.7 MB     00:00     
(2/9): php-cli-5.6.16-1.el6.remi.x86_64.rpm                                                                                                                             | 3.9 MB     00:00     
(3/9): php-common-5.6.16-1.el6.remi.x86_64.rpm                                                                                                                          | 1.1 MB     00:00     
(4/9): php-gd-5.6.16-1.el6.remi.x86_64.rpm                                                                                                                              |  75 kB     00:00     
(5/9): php-mbstring-5.6.16-1.el6.remi.x86_64.rpm                                                                                                                        | 965 kB     00:00     
(6/9): php-mcrypt-5.6.16-1.el6.remi.x86_64.rpm                                                                                                                          |  46 kB     00:00     
(7/9): php-mysqlnd-5.6.16-1.el6.remi.x86_64.rpm                                                                                                                         | 273 kB     00:00     
(8/9): php-pdo-5.6.16-1.el6.remi.x86_64.rpm                                                                                                                             | 116 kB     00:00     
(9/9): php-xml-5.6.16-1.el6.remi.x86_64.rpm                                                                                                                             | 213 kB     00:00     
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                          3.7 MB/s | 9.3 MB     00:02     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction

WARNING : These php-* RPMs are not official Fedora / Red Hat build and
overrides the official ones. Don't file bugs on Fedora Project nor Red Hat.

Use dedicated forum at http://forum.remirepo.net/

  Updating   : php-common-5.6.16-1.el6.remi.x86_64                                                                                                                                        1/17 
  Updating   : php-cli-5.6.16-1.el6.remi.x86_64                                                                                                                                           2/17 
  Updating   : php-pdo-5.6.16-1.el6.remi.x86_64                                                                                                                                           3/17 
  Updating   : php-mysqlnd-5.6.16-1.el6.remi.x86_64                                                                                                                                       4/17 
  Updating   : php-5.6.16-1.el6.remi.x86_64                                                                                                                                               5/17 
  Updating   : php-gd-5.6.16-1.el6.remi.x86_64                                                                                                                                            6/17 
  Updating   : php-mbstring-5.6.16-1.el6.remi.x86_64                                                                                                                                      7/17 
  Updating   : php-mcrypt-5.6.16-1.el6.remi.x86_64                                                                                                                                        8/17 
  Installing : php-xml-5.6.16-1.el6.remi.x86_64                                                                                                                                           9/17 
  Cleanup    : php-5.6.13-1.el6.remi.x86_64                                                                                                                                              10/17 
  Cleanup    : php-cli-5.6.13-1.el6.remi.x86_64                                                                                                                                          11/17 
  Cleanup    : php-mcrypt-5.6.13-1.el6.remi.x86_64                                                                                                                                       12/17 
  Cleanup    : php-mysqlnd-5.6.13-1.el6.remi.x86_64                                                                                                                                      13/17 
  Cleanup    : php-pdo-5.6.13-1.el6.remi.x86_64                                                                                                                                          14/17 
  Cleanup    : php-mbstring-5.6.13-1.el6.remi.x86_64                                                                                                                                     15/17 
  Cleanup    : php-gd-5.6.13-1.el6.remi.x86_64                                                                                                                                           16/17 
  Cleanup    : php-common-5.6.13-1.el6.remi.x86_64                                                                                                                                       17/17 
  Verifying  : php-gd-5.6.16-1.el6.remi.x86_64                                                                                                                                            1/17 
  Verifying  : php-mbstring-5.6.16-1.el6.remi.x86_64                                                                                                                                      2/17 
  Verifying  : php-mysqlnd-5.6.16-1.el6.remi.x86_64                                                                                                                                       3/17 
  Verifying  : php-cli-5.6.16-1.el6.remi.x86_64                                                                                                                                           4/17 
  Verifying  : php-mcrypt-5.6.16-1.el6.remi.x86_64                                                                                                                                        5/17 
  Verifying  : php-xml-5.6.16-1.el6.remi.x86_64                                                                                                                                           6/17 
  Verifying  : php-pdo-5.6.16-1.el6.remi.x86_64                                                                                                                                           7/17 
  Verifying  : php-common-5.6.16-1.el6.remi.x86_64                                                                                                                                        8/17 
  Verifying  : php-5.6.16-1.el6.remi.x86_64                                                                                                                                               9/17 
  Verifying  : php-cli-5.6.13-1.el6.remi.x86_64                                                                                                                                          10/17 
  Verifying  : php-mcrypt-5.6.13-1.el6.remi.x86_64                                                                                                                                       11/17 
  Verifying  : php-mbstring-5.6.13-1.el6.remi.x86_64                                                                                                                                     12/17 
  Verifying  : php-common-5.6.13-1.el6.remi.x86_64                                                                                                                                       13/17 
  Verifying  : php-pdo-5.6.13-1.el6.remi.x86_64                                                                                                                                          14/17 
  Verifying  : php-5.6.13-1.el6.remi.x86_64                                                                                                                                              15/17 
  Verifying  : php-gd-5.6.13-1.el6.remi.x86_64                                                                                                                                           16/17 
  Verifying  : php-mysqlnd-5.6.13-1.el6.remi.x86_64                                                                                                                                      17/17 

Installed:
  php-xml.x86_64 0:5.6.16-1.el6.remi                                                                                                                                                           

Dependency Updated:
  php.x86_64 0:5.6.16-1.el6.remi        php-cli.x86_64 0:5.6.16-1.el6.remi     php-common.x86_64 0:5.6.16-1.el6.remi php-gd.x86_64 0:5.6.16-1.el6.remi php-mbstring.x86_64 0:5.6.16-1.el6.remi
  php-mcrypt.x86_64 0:5.6.16-1.el6.remi php-mysqlnd.x86_64 0:5.6.16-1.el6.remi php-pdo.x86_64 0:5.6.16-1.el6.remi   

Complete!

2 个答案:

答案 0 :(得分:2)

安装php-xml包。

sudo yum install php-xml

答案 1 :(得分:0)

对于php 5.6使用

sudo yum install php5.6-xml in centos

和ubuntu

sudo apt-get install php5.6-xml