Trying to install Aegir 7.x-3.x with Drush 5.x fails with the following error message:

drush version 5.10.0
Cannot determine release date for drush [18.47 sec, 9.63 MB]                                                                                  [notice]
Drush !version is not supported [18.47 sec, 7.18 MB]                                                                                       [error]

I traced this issue to line 86 of provision/platform/drupal/install_7.inc:

switch (substr(drush_core_version(), 0, 1)) {

That doesn't work because of the differences in drush_core_version() in Drush 5.x and Drush 6.x+.

In 5.x, it prints the Drush version using drush_print():

http://api.drush.org/api/drush/commands%21core%21core.drush.inc/function...

In 6.x+, it returns the DRUSH_VERSION constant:

http://api.drush.org/api/drush/commands%21core%21core.drush.inc/function...

Because 5.x's drush_core_version() doesn't actually return a value (it prints it), the switch statement at line 86 on install_7.inc cannot work with it.

I was able to bypass this issue and get Aegir installed by changing line 86 to:

switch (substr(DRUSH_VERSION, 0, 1)) {

However, I don't think that's a good permanent fix. drush_core_version() is the ideal approach... it just doesn't work in 5.x. So we need to do it another way.

Comments

m.stenta created an issue. See original summary.

gboudrias’s picture

We don't support Drush 5.x in Aegir 3. Please update the issue if this is still the same problem in Drush 6.

m.stenta’s picture

I just experienced the same issue with Drush 6.7-dev, and changing line 86 to switch (substr(DRUSH_VERSION, 0, 1)) { fixed it again in this instance.

I'm not sure exactly what's going wrong in this case, but it seems to be very similar.

shreyu’s picture

I also facing same issue while installing new site.

I am using aegir2 with hostmater 7.x-3.2
and drupal7 as platform.

Error : Drush !version is not supported

helmo’s picture

@shreyu hostmaster 3.2 == Aegir 3

Try running 'drush --version' to see what Drush version you have ... 8.x is recommended these days.
But please consider upgrading your hostmaster site aswel, we're at 3.9 by now.

shreyu’s picture

Btw thanks helmo for suggestion , but some how some permission level issue and fixed it with sudoers.

helmo’s picture

Status: Active » Closed (outdated)

Please re-open if there is still something to fix with Aegir 3.10