PHP bin/magento setup:upgrade 给出错误 (localhost ubuntu 16.04)



PHP bin/Magento module:status

我正在制作磁电机简单的自定义模块,但给我以下错误。

    user@user:/opt/lampp/htdocs/magento2$ php bin/magento module:status 
PHP Fatal error:  Uncaught Error: Class 'DOMDocument' not found in /opt/lampp/htdocs/magento2/vendor/magento/framework/Config/Dom.php:364
Stack trace:
#0 /opt/lampp/htdocs/magento2/vendor/magento/framework/Config/Dom.php(109): MagentoFrameworkConfigDom->_initDom('<?xml version="...')
#1 /opt/lampp/htdocs/magento2/vendor/magento/framework/ObjectManager/Config/Reader/Dom.php(70): MagentoFrameworkConfigDom->__construct('<?xml version="...', Object(MagentoFrameworkAppArgumentsValidationState), Array, 'xsi:type', NULL)
#2 /opt/lampp/htdocs/magento2/vendor/magento/framework/Config/Reader/Filesystem.php(146): MagentoFrameworkObjectManagerConfigReaderDom->_createConfigMerger('Magento\Framewo...', '<?xml version="...')
#3 /opt/lampp/htdocs/magento2/vendor/magento/framework/Config/Reader/Filesystem.php(127): MagentoFrameworkConfigReaderFilesystem->_readFiles(Object(MagentoFrameworkConfigFileIterator))
#4 /opt/lampp/htdocs/magento2/vendor/magento/framework/App/ObjectManagerFactory.php(269): MagentoFrameworkConfig in /opt/lampp/htdocs/magento2/vendor/magento/framework/Config/Dom.php on line 364

我什至使用以下命令安装了 dom再次重新启动 Apache2 但相同的错误/usser@user:/opt/lampp/htdocs/magento2$ sudo apt-get install php5.6-dom

嘿,请您在使用以下命令删除生成的文件后尝试setup:升级命令。

rm -rf var/di var/generation var/cache var/page_cache var/view_preprocessed

问题可能不是 Dom 的问题。

最新更新