Error with installing Drush on via Ansible

2

When installing Drush, with the following task

action: command pear install drush/drush creates=/usr/bin/drush tags: drush

I get the dollowing error:

TASK: [Drush | Install drush] ************************************************* failed: [default] => {"changed": true, "cmd": ["pear", "install", "drush/drush"], "delta": "0:00:01.318926", "end": "2014-02-14 09:25:46.666768", "item": "", "rc": 255, "start": "2014-02-14 09:25:45.347842"} stderr: PHP Notice: Array to string conversion in /usr/share/php/PEAR/REST/13.php on line 80 PHP Warning: Invalid argument supplied for foreach() in /usr/share/php/PEAR/REST/13.php on line 84 PHP Fatal error: Cannot use string offset as an array in /usr/share/php/PEAR/REST/10.php on line 263 stdout: Notice: Array to string conversion in PEAR/REST/13.php on line 80

Warning: Invalid argument supplied for foreach() in PEAR/REST/13.php on line 84

FATAL: all hosts have already failed -- aborting

sanders

Posted 2014-02-14T09:39:00.643

Reputation: 189

i'm getting the same error in a different situation. i installed ubuntu under virtual box, setup a lamp server, added pear and went to install drush and get the same error. Looking online I haven't found a solution yet. Suggestions I've seen are setting timezone in php.ini and upgrading pear. Neither helped. – snowguy – 2014-02-14T16:45:50.707

Answers

0

I ran across this question while researching the same error using the Vagrant LAMP Ansible Drupal (VLAD) project. I also happened to notice that the PEAR installation instructions have just recently been removed (2 days ago) from Drush. It doesn't say explicitly that the pear channel has been disabled, but it does indicate that it might be a good time to consider switching to Composer or manual install of Drush.

Matt V.

Posted 2014-02-14T09:39:00.643

Reputation: 165