所以我刚刚安装了 Scotchbox(一个流浪的安装程序)。 https://github.com/scotch-io/scotch-box
当我尝试安装 Composer 依赖项时,出现以下错误。
Problem 1
- phpunit/php-code-coverage 4.0.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/php-code-coverage 4.0.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/php-code-coverage 4.0.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- Installation request for phpunit/php-code-coverage (locked at 4.0.8) -> satisfiable by phpunit/php-code-coverage[4.0.8].
我尝试过的
其他一些线程建议这包含在 php-xml 包中。我尝试安装这个做
sudo apt-get install php7.0-xml
sudo service apache2 restart
但这没有用。 知道还有哪些其他解决方案可能有效吗?我开始拔头发了。
最佳答案
对我来说,所选的答案不起作用。
这确实有效:
sudo apt-get install php-xml
这是在 Ubuntu 16.04 上使用 PHP 7。
关于php - 您的系统中缺少请求的 PHP 扩展 dom,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44952650/