- Installation Of phpunit/PHPUnit Requires PHP Extension dom
- Phpunit phpunit 6 0 0 requires ext dom
- PHP7 : install ext-dom issue
- Phpunit/phpunit 57 requires ext dom the requested PHP extension
- Can’t install Laravel via Composer
- The requested PHP extension dom is missing from your system
- Errors in Laravel Creating Project
- Laravel по-русски
- #1 04.03.2018 21:16:19
- Ошибка PHP при установке laravel
Installation Of phpunit/PHPUnit Requires PHP Extension dom
So, you are trying to install phpunit/PHPUnit via pear and you got a message that PHP extension dom is required.
Here’s how your resolve it.
pear channel-discover pear.phpunit.de
You would see output like:
Adding Channel "pear.phpunit.de" succeeded Discovery of channel "pear.phpunit.de" succeeded
Next, install phpunit/PHPunit
pear install phpunit/PHPUnit
Oops. It fails. Sample message below:
Did not download optional dependencies: pear/Image_GraphViz, pear/Log, use --alldeps to download automatically phpunit/PHPUnit requires PHP extension "dom"
The remedy to the problem appears to be printed in the error message.
pear install -a phpunit/PHPUnit
The -a option installs all required and optional dependencies. You can also type –alldeps in the place of -a.
dom is enabled at the time of PHP installation. If not, you have to install the PHP-XML or PHP-DOM package depending on the package naming conventions of your Linux distribution.
pear install -a phpunit/PHPUnit
Here’s a sample successful output:
pear install -a phpunit/PHPUnit phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.0) downloading PHPUnit-3.3.5.tgz . Starting to download PHPUnit-3.3.5.tgz (269,292 bytes) . done: 269,292 bytes install ok: channel://pear.phpunit.de/PHPUnit-3.3.5
For your information, the package php-pear-PHPUnit is available in the Fedora repositories. You can simply use
yum install php-pear-PHPUnit
if you don’t want to use pear install.
Phpunit phpunit 6 0 0 requires ext dom
Or you can try with specific php version as follow: php7.0-xml php7.0-common for php 7.0 Solution 2: I am using Ubuntu 17.10 and PHP 7.1 is running well using If you are using another version of PHP, for example: 7.0 can change it to Don’t forget to alwasy restart web server, for example in Ubuntu you can type in terminal: After that you can try run composer again. If your PHP version is not the latest, then you can add version in it: Solution 3: For CentOS, RHEL, Fedora: Then select the php-xml version matching your php version: Solution 1: Looks to me it is mainly focus at message .
PHP7 : install ext-dom issue
First of all, read the warning! It says do not run composer as root ! Secondly, you’re probably using Xammp on your local which has the required php libraries as default.
But in your server you’re missing ext-dom . php-xml has all the related packages you need. So, you can simply install it by running:
sudo apt-get update sudo apt install php-xml
Most likely you are missing mbstring too. If you get the error, install this package as well with:
sudo apt-get install php-mbstring
composer update composer require cviebrock/eloquent-sluggable
sudo apt install php-xml will work but the thing is it will download the plugin for the latest PHP version.
If your PHP version is not the latest, then you can add version in it:
# PHP 7.1 sudo apt install php7.1-xml # PHP 7.2: sudo apt install php7.2-xml # PHP 7.3 sudo apt install php7.3-xml # PHP 7.4 sudo apt install php7.4-xml # PHP 8 sudo apt install php-xml
$ yum search php-xml ============================================================================================================ N/S matched: php-xml ============================================================================================================ php-xml.x86_64 : A module for PHP applications which use XML php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol php-xmlseclibs.noarch : PHP library for XML Security php54-php-xml.x86_64 : A module for PHP applications which use XML php54-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol php55-php-xml.x86_64 : A module for PHP applications which use XML php55-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol php56-php-xml.x86_64 : A module for PHP applications which use XML php56-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol php70-php-xml.x86_64 : A module for PHP applications which use XML php70-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol php71-php-xml.x86_64 : A module for PHP applications which use XML php71-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol php72-php-xml.x86_64 : A module for PHP applications which use XML php72-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol php73-php-xml.x86_64 : A module for PHP applications which use XML php73-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol
Then select the php-xml version matching your php version:
# php -v PHP 7.2.11 (cli) (built: Oct 10 2018 10:00:29) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies # sudo yum install -y php72-php-xml.x86_64
While installation using laravel 5.4 with PHP 5.6, To Fix this problem, i have made some installation: sudo apt-get install yum (You need to install php dom extension) Still the problem not
Phpunit/phpunit 57 requires ext dom the requested PHP extension
i’m trying to install laravel with composer on my ubuntu 16.04. But i’m getting an error like
Duration: 3:52
Can’t install Laravel via Composer
Looks to me it is mainly focus at message requires ext-dom . Possible work around i can suggest is to install following packages:
Or you can try with specific php version as follow:
sudo apt-get install php7.0-xml
I am using Ubuntu 17.10 and PHP 7.1 is running well using
sudo apt-get install php7.1-xml
If you are using another version of PHP, for example: 7.0 can change it to
sudo apt-get install php7.0-xml
Don’t forget to alwasy restart web server, for example in Ubuntu you can type in terminal:
sudo service apache2 reload
After that you can try run composer again. Hope this helps.
Laravel Composer install failed with error in ubuntu, — phpunit/php-code-coverage 5.3.2 requires ext-dom * -> the requested PHP extension dom is missing from your system. Problem 9 — Installation
The requested PHP extension dom is missing from your system
For me the selected answer didn’t work.
sudo apt-get install php-xml
This was on Ubuntu 16.04 with PHP 7.
sudo apt-get install php7.0-common
use sudo apt-get install php7.2-xml if you are using ubuntu and php-fpm7.2
Extension gd is missing from your system, I have installed php7, I did the following to solve exactly the same error sudo apt-get install php7.0-gd sudo apt-get install php7.0-intl sudo apt-get
Errors in Laravel Creating Project
You should install the php-xml in order to make this happen.
sudo apt-get install php-xml
this will install the php-xml (depends on what version of php you’re using). I think you can also do the following:
sudo apt-get install php7.0-xml
It is missing from your system. Install or enable PHP’s dom extension, Answers related to “phpunit/phpunit[9.3.3, , 9.5.x-dev] require ext-dom * -> it is missing from your system. Install or enable PHP’s dom extension.”.
Laravel по-русски
Русское сообщество разработки на PHP-фреймворке Laravel.
Страницы 1
#1 04.03.2018 21:16:19
Ошибка PHP при установке laravel
Ставлю Laravel на Linux Ubuntu 14.04.5 LTS через composer.
composer create-project laravel/laravel laravel --prefer-dist
Your requirements could not be resolved to an installable set of packages. Problem 1 - phpunit/phpunit 6.5.7 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.5.6 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.5.5 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.5.4 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.5.3 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.5.2 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.5.1 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.5.0 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.4.4 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.4.3 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.4.2 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.4.1 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.4.0 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.3.1 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.3.0 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.2.4 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.2.3 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.2.2 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.2.1 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.2.0 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.1.4 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.1.3 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.1.2 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.1.1 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.1.0 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.0.9 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.0.8 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.0.7 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.0.6 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.0.5 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.0.4 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.0.3 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.0.2 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.0.13 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.0.12 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.0.11 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.0.10 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.0.1 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 6.0.0 requires ext-dom * -> the requested PHP extension dom is missing from your system. - Installation request for phpunit/phpunit ~6.0 -> satisfiable by phpunit/phpunit[6.0.0, 6.0.1, 6.0.10, 6.0.11, 6.0.12, 6.0.13, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.0.9, 6.1.0, 6.1.1, 6.1.2, 6.1.3, 6.1.4, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.2.4, 6.3.0, 6.3.1, 6.4.0, 6.4.1, 6.4.2, 6.4.3, 6.4.4, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.6, 6.5.7]. To enable extensions, verify that they are enabled in your .ini files: - /etc/php/7.0/cli/php.ini - /etc/php/7.0/cli/conf.d/10-mysqlnd.ini - /etc/php/7.0/cli/conf.d/10-opcache.ini - /etc/php/7.0/cli/conf.d/10-pdo.ini - /etc/php/7.0/cli/conf.d/20-calendar.ini - /etc/php/7.0/cli/conf.d/20-ctype.ini - /etc/php/7.0/cli/conf.d/20-exif.ini - /etc/php/7.0/cli/conf.d/20-fileinfo.ini - /etc/php/7.0/cli/conf.d/20-ftp.ini - /etc/php/7.0/cli/conf.d/20-gettext.ini - /etc/php/7.0/cli/conf.d/20-iconv.ini - /etc/php/7.0/cli/conf.d/20-json.ini - /etc/php/7.0/cli/conf.d/20-mbstring.ini - /etc/php/7.0/cli/conf.d/20-mysqli.ini - /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini - /etc/php/7.0/cli/conf.d/20-phar.ini - /etc/php/7.0/cli/conf.d/20-posix.ini - /etc/php/7.0/cli/conf.d/20-readline.ini - /etc/php/7.0/cli/conf.d/20-shmop.ini - /etc/php/7.0/cli/conf.d/20-sockets.ini - /etc/php/7.0/cli/conf.d/20-sysvmsg.ini - /etc/php/7.0/cli/conf.d/20-sysvsem.ini - /etc/php/7.0/cli/conf.d/20-sysvshm.ini - /etc/php/7.0/cli/conf.d/20-tokenizer.ini You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Можно как-то это все исправить одним махом?