【问题标题】:AWS EC2 Class 'DOMDocument' not found Laravel未找到 AWS EC2 类“DOMDocument”Laravel
【发布时间】:2019-04-06 19:31:00
【问题描述】:

我为此搜索了很多时间,但我真的找不到。 我已经在实例上安装了 LAMP - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-lamp-amazon-linux-2.html

所有解决方案都要求我安装

yum install php-xml 

我做了,但仍然得到同样的错误。我缺少什么依赖项?非常感谢您的帮助!

我正在使用 dompdf。 PHP 版本 7.2.11

【问题讨论】:

  • 试试yum install -y php-xml
  • 我做到了@murtuzahussain
  • 包 php-xml-7.2.11-1.amzn2.0.1.x86_64 已经安装并且是最新版本。在 php.ini 上也尝试过 extension=dom.so
  • 尝试在这个链接上解释然后link
  • 安装模块后别忘了sudo systemctl restart php-fpm

标签: laravel amazon-web-services


【解决方案1】:

我认为您在命令中缺少-y

# yum list installed | grep php-xml
# yum info php-xml
Available Packages
Name        : php-xml
Arch        : x86_64
Version     : 5.3.3  
Release     : 40.el6_6
Size        : 106 k
Repo        : updates 
Summary     : A module for PHP applications which use XML
URL         : http://www.php.net/
License     : PHP
Description : The php-xml package contains dynamic shared objects which add support
            : to PHP for manipulating XML documents using the DOM tree,
            : and performing XSL transformations on XML documents.
# yum install -y php-xml

【讨论】:

    猜你喜欢
    • 2015-10-13
    • 2015-03-31
    • 2019-06-04
    • 2020-03-31
    • 2019-07-18
    • 1970-01-01
    • 2021-06-11
    • 2013-01-01
    • 2016-06-10
    相关资源
    最近更新 更多