Class 'DOMDocument' not found
You need to install the DOM extension. You can do so on Debian / Ubuntu using:
sudo apt-get install php-dom
And on Centos / Fedora / Red Hat:
yum install php-xml
If you get conflicts between PHP packages, you could try to see if the specific PHP version package exists instead: e.g. php53-xml
if your system runs PHP5.3.
PHP8: (latest version)
sudo apt-get install php8.0-xml
PHP7:
sudo apt-get install php7.1-xml
You can also do:
sudo apt-get install php-dom
and apt-get
will show you where it is.
PHP 7.0:
- Ubuntu:
apt-get install php7.0-xml
- CentOS / Fedora / Red Hat:
yum install php70w-xml
PHP 7.1:
- Ubuntu:
apt-get install php7.1-xml
- CentOS / Fedora / Red Hat:
yum install php71w-xml
PHP 7.2:
- Ubuntu:
apt-get install php7.2-xml
- CentOS / Fedora / Red Hat:
yum install php72w-xml
PHP 7.3:
- Ubuntu:
apt-get install php7.3-xml
- CentOS / Fedora / Red Hat:
yum install php73w-xml
PHP 7.4:
- Ubuntu:
apt-get install php7.4-xml
- CentOS / Fedora / Red Hat:
yum install php74w-xml
PHP 8.0
- Ubuntu:
apt-get install php8.0-xml
- CentOS 8 [with
php:remi-8.0
enabled]:dnf install php-xml