laravel报错:requires ext-dom * -> the requested PHP extension dom is missing from your system.
出错信息如下:
Crafting application…
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
– Installation request for tijsverkoyen/css-to-inline-styles 2.2.2 -> satisfiable by tijsverkoyen/css-to-inline-styles[2.2.2].
– tijsverkoyen/css-to-inline-styles 2.2.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 2
– Installation request for phar-io/manifest 1.0.3 -> satisfiable by phar-io/manifest[1.0.3].
– phar-io/manifest 1.0.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 3
– Installation request for phpunit/php-code-coverage 7.0.10 -> satisfiable by phpunit/php-code-coverage[7.0.10].
– phpunit/php-code-coverage 7.0.10 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 4
– Installation request for phpunit/phpunit 8.4.3 -> satisfiable by phpunit/phpunit[8.4.3].
– phpunit/phpunit 8.4.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 5
– Installation request for theseer/tokenizer 1.1.3 -> satisfiable by theseer/tokenizer[1.1.3].
– theseer/tokenizer 1.1.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 6
– tijsverkoyen/css-to-inline-styles 2.2.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
– laravel/framework v6.6.1 requires tijsverkoyen/css-to-inline-styles ^2.2.1 -> satisfiable by tijsverkoyen/css-to-inline-styles[2.2.2].
– Installation request for laravel/framework v6.6.1 -> satisfiable by laravel/framework[v6.6.1].
错误信息中没有明确信息是缺少哪个扩展,解决方法:
安装xml插件即可解决:
根据你的php版本去选择
先搜索扩展 apt-cache search xml| grep php
sudo apt install php7.4-xml
在尝试安装或更新Laravel应用时遇到了错误,提示缺少PHP的DOM扩展。要修复此问题,你需要安装XML插件。对于PHP 7.4版本,可以使用`sudo apt install php7.4-xml`命令。确保安装对应你当前PHP版本的正确扩展,重启服务器后,错误应当消除,允许你继续进行Laravel的安装或更新过程。
425

被折叠的 条评论
为什么被折叠?



