Symfony 3作曲家,缺少ext-dom和ext-xml [英] Symfony 3 composer, ext-dom and ext-xml missing
问题描述
我正在运行Linux Mint 18.1.我的IDE是PhpStorm,我正在尝试通过作曲家安装PHPUnit.我在 https://getcomposer.org/download/中遵循了安装步骤.
I am running Linux Mint 18.1. My IDE is PhpStorm and I am trying to install PHPUnit trough the composer. I followed the installation steps at https://getcomposer.org/download/.
问题1 -phpunit/phpunit 6.4.x-dev的安装请求-> phpunit/phpunit [6.4.x-dev]可满足. -phpunit/phpunit 6.4.x-dev需要ext-dom *->系统中缺少所请求的PHP扩展dom.
问题2 -symfony/symfony v3.3.6需要ext-xml *->您的系统中缺少所请求的PHP扩展xml. -symfony/symfony v3.3.6需要ext-xml *->您的系统中缺少所请求的PHP扩展xml. -symfony/symfony v3.3.6需要ext-xml *->您的系统中缺少所请求的PHP扩展xml. -symfony/symfony的安装请求(锁定在v3.3.6,要求为3.3.*)-> symfony/symfony [v3.3.6]可以满足.
Problem 1 - Installation request for phpunit/phpunit 6.4.x-dev -> satisfiable by phpunit/phpunit[6.4.x-dev]. - phpunit/phpunit 6.4.x-dev requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 2 - symfony/symfony v3.3.6 requires ext-xml * -> the requested PHP extension xml is missing from your system. - symfony/symfony v3.3.6 requires ext-xml * -> the requested PHP extension xml is missing from your system. - symfony/symfony v3.3.6 requires ext-xml * -> the requested PHP extension xml is missing from your system. - Installation request for symfony/symfony (locked at v3.3.6, required as 3.3.*) -> satisfiable by symfony/symfony[v3.3.6].
我尝试过的解决方案:
- 安装php-xml
- 安装php7.0-xml
- 此答案表示要检查是否在您的任何php.ini文件中启用了"extension = dom.so".它甚至不在我的文件中
- Install php-xml
- Install php7.0-xml
- This answer says to check if "extension=dom.so" is enabled in any of your php.ini files. It is not even present in my files
有什么建议吗?非常感谢!
Any suggestions? Thanks a lot!
推荐答案
您需要在Debian中从终端安装的所有内容是:
All you need to install from your terminal in Debian is:
sudo apt-get install php-xml
或者,如果您使用的是PHP 7:
Or, if you're using PHP 7:
sudo apt-get install php7.0-xml
这篇关于Symfony 3作曲家,缺少ext-dom和ext-xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!