Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail with Installation through Composer on Ubuntu 16.04 #2410

Closed
ArtuGit opened this issue Oct 22, 2016 · 5 comments
Closed

Fail with Installation through Composer on Ubuntu 16.04 #2410

ArtuGit opened this issue Oct 22, 2016 · 5 comments

Comments

@ArtuGit
Copy link

ArtuGit commented Oct 22, 2016

I use an official instruction
http://www.drush.org/en/master/install-alternative/#install-a-global-drush-via-compose

Chapter: Install Drush for all users via Composer

I get this errors list:

root@Desktop:/opt/drush-8.x# drush
PHP Fatal error: Uncaught ReflectionException: Class DOMDocument does not exist in /opt/drush-8.x/vendor/consolidation/output-formatters/src/Transformations/DomToArraySimplifier.php:24
Stack trace:
#0 /opt/drush-8.x/vendor/consolidation/output-formatters/src/Transformations/DomToArraySimplifier.php(24): ReflectionClass->isSubclassOf('DOMDocument')
#1 /opt/drush-8.x/vendor/consolidation/output-formatters/src/FormatterManager.php(339): Consolidation\OutputFormatters\Transformations\DomToArraySimplifier->canSimplify(Object(ReflectionClass))
#2 /opt/drush-8.x/vendor/consolidation/output-formatters/src/FormatterManager.php(177): Consolidation\OutputFormatters\FormatterManager->canSimplifyToArray(Object(ReflectionClass))
#3 /opt/drush-8.x/vendor/consolidation/output-formatters/src/FormatterManager.php(172): Consolidation\OutputFormatters\FormatterManager->isValidDataType(Object(Consolidation\OutputFormatters\Formatters\StringFormatter), Object(ReflectionClass))
#4 /opt/drush-8.x/vendor/consolidation/output-formatters/src/FormatterM in /opt/drush-8.x/vendor/consolidation/output-formatters/src/Transformations/DomToArraySimplifier.php on line 24

Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Uncaught ReflectionException: Class DOMDocument does not exist in
/opt/drush-8.x/vendor/consolidation/output-formatters/src/Transformations/DomToArraySimplifier.php:24
Stack trace:
#0 /opt/drush-8.x/vendor/consolidation/output-formatters/src/Transformations/DomToArraySimplifier.php(24):

ReflectionClass->isSubclassOf('DOMDocument')
#1 /opt/drush-8.x/vendor/consolidation/output-formatters/src/FormatterManager.php(339):

Consolidation\OutputFormatters\Transformations\DomToArraySimplifier->canSimplify(Object(ReflectionClass))
#2 /opt/drush-8.x/vendor/consolidation/output-formatters/src/FormatterManager.php(177):

Consolidation\OutputFormatters\FormatterManager->canSimplifyToArray(Object(ReflectionClass))
#3 /opt/drush-8.x/vendor/consolidation/output-formatters/src/FormatterManager.php(172):

Consolidation\OutputFormatters\FormatterManager->isValidDataType(Object(Consolidation\OutputFormatters\Formatters\StringFormatter),
Object(ReflectionClass))
#4 /opt/drush-8.x/vendor/consolidation/output-formatters/src/FormatterM in

/opt/drush-8.x/vendor/consolidation/output-formatters/src/Transformations/DomToArraySimplifier.php, line 24
root@Desktop:/opt/drush-8.x#

@weitzman
Copy link
Member

Can you paste the output of php --version

@ArtuGit
Copy link
Author

ArtuGit commented Oct 25, 2016

Initially, I installed the standard variant which was offered me from a command line.
Then I installed the version according to an Digital Ocean instruction without Apache and MySQL.

PHP 7.0.8-0ubuntu0.16.04.3 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.8-0ubuntu0.16.04.3, Copyright (c) 1999-2016, by Zend Technologies

@geek-merlin
Copy link
Contributor

Greg has answered this on SO:

sudo apt-get install php-xml

Let's make this a feature request (separate ticket?):
Print informative message if php-xml extension missing

@weitzman
Copy link
Member

Maybe add comment to #1371

@ArtuGit
Copy link
Author

ArtuGit commented Oct 29, 2016

It works for me.
Thank you very much.

I agree that a separate ticket will be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants