laravel composer update : 您的系统中缺少请求的 PHP 扩展 dom
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37873482/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
laravel composer update : the requested PHP extension dom is missing from your system
提问by Vivek Chaudhari
I am using ubuntu 16.04, laravel 5.2 when i run update composer in my project directory its showing "the requested PHP extension dom is missing from your system" i checked installed packages of PHP, its available there
我正在使用 ubuntu 16.04,laravel 5.2,当我在我的项目目录中运行 update composer 时,它显示“您的系统中缺少请求的 PHP 扩展 dom”我检查了已安装的 PHP 包,它在那里可用
回答by Abaza
Installing xml-extension (php7.0-xml in my case) solved the problem
安装 xml-extension(在我的例子中是 php7.0-xml)解决了这个问题
sudo apt-get install php-xml
回答by Joyal
If PHP version is 7.2, execute the following command
如果PHP版本是7.2,执行以下命令
sudo apt-get install php7.2-xml
回答by Manoj Thapliyal
Managed to fix it with a php version 5.6* :
设法使用 php 版本 5.6* 修复它:
$ sudo apt-get update
$ sudo apt-get install php5.6-xml
回答by Adrien
DOM is a PHP extension and not a PHP package. This means that your version of PHP needs to be recompiled with the extension. It is possible however that your PHP was already compiled with DOM but that DOM is not enabled.
You can check this in your php.ini (search for extension=dom.so
and make sure it's uncommented).
DOM 是 PHP 扩展而不是 PHP 包。这意味着您的 PHP 版本需要使用扩展重新编译。但是,您的 PHP 可能已经使用 DOM 进行了编译,但未启用 DOM。您可以在 php.ini 中检查它(搜索extension=dom.so
并确保它未注释)。
回答by user6437700
You might have some missing dependencies, so first run
您可能缺少一些依赖项,因此请先运行
sudo apt-get -f install
Then install php-xml
然后安装php-xml
sudo apt-get install php-xml
This worked for me.
这对我有用。
回答by Miguel Romero
In my case I use
在我的情况下,我使用
sudo apt-get update
sudo apt-get 更新
and
和
sudo apt-get install php7.3-xml
须藤 apt-get 安装 php7.3-xml