所以我刚刚安装了 Scotchbox(一个 vagrant 设置)。 https://github.com/scotch-io/scotch-box
当我收到以下错误时,我正在尝试安装作曲家依赖项。
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
但这没有用。知道其他解决方案可能有用吗?我开始拔头发。
原文由 Miguel Stevens 发布,翻译遵循 CC BY-SA 4.0 许可协议
对我来说,选择的答案不起作用。
这确实有效:
这是在带有 PHP 7 的 Ubuntu 16.04 上。