找不到PHP 7 DomDocument [英] PHP 7 DomDocument not found

查看:95
本文介绍了找不到PHP 7 DomDocument的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试运行命令:app/console cache:clear

这会给我返回错误:

执行'cache:clear --no-warmup'"命令时发生错误:
PHP致命错误:未捕获的Symfony \ Component \ Debug \ Exception \ FatalThrowable
错误:致命错误:在/var/www/html/vendor/s
中找不到类'DOMDocument' ymfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:52

An error occurred when executing the "'cache:clear --no-warmup'" command:
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowable
Error: Fatal error: Class 'DOMDocument' not found in /var/www/html/vendor/s
ymfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:52

Ubuntu 14.04 LTS 我使用PHP 7并安装php5-dom无法解决我的问题: sudo apt-get install php5-dom

Ubuntu 14.04 LTS I use PHP 7 and install php5-dom not resolved my problem: sudo apt-get install php5-dom

推荐答案

我在Ubuntu上遇到了相同的问题,并通过以下操作对其进行了修复

I had the same issue on Ubuntu and fixed it doing the following

apt-get install php-xml

sudo apt-get install php-xml

如果不是root用户

这篇关于找不到PHP 7 DomDocument的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆