Drush dl non funziona con PHP 7 e Ubuntu 16.04


11

Quando provo a fare:

drush dl drupal-8

ottengo il seguente errore:

PHP Fatal error:  Uncaught Error: Call to undefined function Drush\UpdateService\simplexml_load_file() in /home/alexander/.config/composer/vendor/drush/drush/lib/Drush/UpdateService/Project.php:74
Stack trace:
#0 /home/alexander/.config/composer/vendor/drush/drush/lib/Drush/UpdateService/ReleaseInfo.php(64): Drush\UpdateService\Project::getInstance(Array, 86400)
#1 /home/alexander/.config/composer/vendor/drush/drush/lib/Drush/UpdateService/ReleaseInfo.php(122): Drush\UpdateService\ReleaseInfo->get(Array)
#2 /home/alexander/.config/composer/vendor/drush/drush/commands/pm/download.pm.inc(111): Drush\UpdateService\ReleaseInfo->selectReleaseBasedOnStrategy(Array, '', 'auto', false, NULL)
#3 /home/alexander/.config/composer/vendor/drush/drush/includes/command.inc(366): drush_pm_download()
#4 /home/alexander/.config/composer/vendor/drush/drush/includes/command.inc(217): _drush_invoke_hooks(Array, Array)
#5 /home/alexander/.config/composer/vendor/drush/drush/includes/command.inc(185): drush_command()
#6 /home/alexander/.config/compos in /home/alexander/.config/composer/vendor/drush/drush/lib/Drush/UpdateService/Project.php on line 74
Drush command terminated abnormally due to an unrecoverable error.

Altri comandi funzionano: drush cc, drush status.

Ecco l'output dello stato di Drush:

 PHP executable         :  /usr/bin/php
 PHP configuration      :  /etc/php/7.0/cli/php.ini
 PHP OS                 :  Linux
 Drush script           :  /home/alexander/.config/composer/vendor/drush/drush/drush.php
 Drush version          :  8.1.2
 Drush temp directory   :  /tmp
 Drush configuration    :
 Drush alias files      :

Risposte:


17

Sembra che tu sia riuscito a installare / configurare PHP senza l'estensione simplexml.

Installa il pacchetto php7.0-xml con apt-get come segue.

sudo apt-get install php-xml

Controlla anche il programma di installazione dell'interfaccia utente, se ti manca questo, allora probabilmente manchi anche un sacco di altre estensioni link mbstring, gd e così via per installare / utilizzare Drupal.


Verificato, ha funzionato e ha dovuto farlo per l'installazione standard di Ubuntu 16.04.
Darrell Ulm,
Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.