蓝少个人博客

实迷途其未远,觉今是而昨非

CentOS6 使用composer install 报错 dom is missing

日期:2017-06-21 阅读:868 分类:学无止境 标签:Linux 

问题


[root@localhost laravel-demo]# composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - phpunit/phpunit 5.7.9 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.7 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.6 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.5 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.4 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.20 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.19 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.18 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.17 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.16 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.15 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.14 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.13 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.12 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.11 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.10 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 5.7.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - Installation request for phpunit/phpunit ~5.7 -> satisfiable by phpunit/phpunit[5.7.0, 5.7.1, 5.7.10, 5.7.11, 5.7.12, 5.7.13, 5.7.14, 5.7.15, 5.7.16, 5.7.17, 5.7.18, 5.7.19, 5.7.2, 5.7.20, 5.7.3, 5.7.4, 5.7.5, 5.7.6, 5.7.7, 5.7.8, 5.7.9].

  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php.ini
    - /etc/php.d/bz2.ini
    - /etc/php.d/calendar.ini
    - /etc/php.d/ctype.ini
    - /etc/php.d/curl.ini
    - /etc/php.d/exif.ini
    - /etc/php.d/fileinfo.ini
    - /etc/php.d/ftp.ini
    - /etc/php.d/gd.ini
    - /etc/php.d/gettext.ini
    - /etc/php.d/gmp.ini
    - /etc/php.d/iconv.ini
    - /etc/php.d/json.ini
    - /etc/php.d/ldap.ini
    - /etc/php.d/mbstring.ini
    - /etc/php.d/mcrypt.ini
    - /etc/php.d/mysqli.ini
    - /etc/php.d/pdo.ini
    - /etc/php.d/pdo_mysql.ini
    - /etc/php.d/pdo_sqlite.ini
    - /etc/php.d/phar.ini
    - /etc/php.d/shmop.ini
    - /etc/php.d/simplexml.ini
    - /etc/php.d/sockets.ini
    - /etc/php.d/sqlite3.ini
    - /etc/php.d/tokenizer.ini
    - /etc/php.d/xml.ini
    - /etc/php.d/zip.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.


解决:

[root@localhost laravel-demo]#  yum search php70w


[root@localhost laravel-demo]# yum -y install php70w-xml.x86_64

[root@localhost laravel-demo]# service httpd restart

测试:

再次运行

[root@localhost laravel-demo]# composer install

正常,没问题,OK。