Installing modules on other platforms using drush

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by lloydpearsoniv on April 16, 2010 at 1:47am

Everything on my aegir 0.4 alpha 6 installation is running fine. I just have one issue. When i install modules into the hostmaster platform, i have no problems but if i try to install modules to other platforms using drush, i get this error. "Drush command could not be completed"

when i download to the hostmaster platform:

:~/hostmaster-0.4-alpha6$ drush dl acquia_prosper
Project acquia_prosper (6.x-1.0-beta4) downloaded to [success]
/var/aegir/hostmaster-0.4-alpha6/sites/all/themes/acquia_prosper.
:~/hostmaster-0.4-alpha6$ drush dl skinr fusion
Project skinr (6.x-1.5) downloaded to [success]
/var/aegir/hostmaster-0.4-alpha6/sites/all/modules/skinr.
Project fusion (6.x-1.0-rc1) downloaded to [success]
/var/aegir/hostmaster-0.4-alpha6/sites/all/themes/fusion.

When I try to install modules into my acquia-drupal patform:

:~/acquia-drupal-1.2.23$ drush dl ubercart fusion skinr
Drush command could not be completed. [error]
:~/acquia-drupal-1.2.23$ drush dl ubercart
Drush command could not be completed. [error]
:~/acquia-drupal-1.2.23$ drush dl acquia_prosper
Drush command could not be completed. [error]

Am I doing something wrong?

Comments

Try adding --debug to the

Posted by jamiet on April 16, 2010 at 8:25am

Try adding --debug to the command and see if the output gives any clues.

HTH
JamieT

Try downloading the modules

Posted by kaerast on April 16, 2010 at 9:30am

Try downloading the modules from within the modules directory (sites/$sitename/modules) rather than the root of the platform. You shouldn't be downloading modules to anywhere else (except perhaps sites/all/modules). I've come across this error when I've tried using drush from outside of a sites/$sitename directory.

Still doesnt work

Posted by lloydpearsoniv on April 16, 2010 at 1:55pm

Still doesn't work...not even debug works.

domU-12-31-39-0A-45-C4:~/acquia-drupal-1.2.23/sites/all/modules$ drush dl ubercart
Drush command could not be completed. [error]
domU-12-31-39-0A-45-C4:~/acquia-drupal-1.2.23/sites/all/modules$ drush debug ubercart
Drush command could not be completed. [error]
domU-12-31-39-0A-45-C4:~/acquia-drupal-1.2.23/sites/all/modules$ drush debug dl ubercart
Drush command could not be completed. [error]
domU-12-31-39-0A-45-C4:~/acquia-drupal-1.2.23/sites/all/modules$

The use of debug is with

Posted by mig5 on April 16, 2010 at 2:03pm

The use of debug is with --debug

for instance

domU-12-31-39-0A-45-C4:~/acquia-drupal-1.2.23/sites/all/modules$ drush --debug dl ubercart

Another thing to try is to

Posted by kaerast on April 16, 2010 at 2:11pm

Another thing to try is to type the full path to drush when running it. I know it shouldn't make a difference, but it sometimes does. Also who are you running drush as? It works best when run as aegir (we found running 'sudo su - aegir' to become the aegir user works best).

domU-12-31-39-0A-45-C4:~/acqu

Posted by lloydpearsoniv on April 16, 2010 at 2:25pm
domU-12-31-39-0A-45-C4:~/acquia-drupal-1.2.23/sites/all/modules$ drush --debug dl ubercart
Found command: pm-download (commandfile=pm) [0.12 sec, 3.28 MB] [bootstrap]
Initializing drush commandfile: drush_make [0.13 sec, 3.28 MB] [bootstrap]
Initializing drush commandfile: drush_make_d_o [0.13 sec, 3.28 MB] [bootstrap]
Initializing drush commandfile: provision [0.13 sec, 3.28 MB] [bootstrap]
Initializing drush commandfile: provision_apache [0.13 sec, 3.28 MB] [bootstrap]
Initializing drush commandfile: provision_drupal [0.13 sec, 3.29 MB] [bootstrap]
Initializing drush commandfile: provision_mysql [0.13 sec, 3.29 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.13 sec, 3.3[bootstrap]
MB]
Loading drushrc "/var/aegir/acquia-drupal-1.2.23/drushrc.php" into [bootstrap]
"drupal" scope. [0.13 sec, 3.3 MB]
Initialized Drupal 6.16 root directory at [notice]
/var/aegir/acquia-drupal-1.2.23 [0.16 sec, 4.19 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.16 sec, [bootstrap]
4.19 MB]
Initialized Drupal site default at sites/default [0.17 sec, 4.19 MB] [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.17[bootstrap]
sec, 4.19 MB]
Undefined index: scheme environment.inc:702 [0.17 sec, 4.2 MB] [notice]
Undefined index: user environment.inc:703 [0.17 sec, 4.2 MB] [notice]
Undefined index: host environment.inc:704 [0.17 sec, 4.2 MB] [notice]
PDO support available, but the driver has not been installed. [bootstrap]
Assuming success. [0.17 sec, 4.2 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.17 sec,[bootstrap]
4.2 MB]
Successfully connected to the Drupal database. [0.17 sec, 4.2 MB] [bootstrap]
Cannot modify header information - headers already sent by (output [warning]
started at /var/aegir/drush/includes/drush.inc:797) install.inc:618
[0.18 sec, 4.43 MB]
Cannot modify header information - headers already sent by (output [warning]
started at /var/aegir/drush/includes/drush.inc:797) install.inc:619
[0.18 sec, 4.43 MB]
Drush command could not be completed. [0.18 sec, 4.43 MB] [error]

I am definitely running it as aegir... i only have 2 users root & aegir

If you have

Posted by j2parker on April 27, 2010 at 2:25pm

If you have ./sites/default/settings.php then drush dl will fail with:

Drush command could not be completed.

If you rm ./sites/default/settings.php then drush dl will succeed but drush en will fail with:

Could not find a Drupal settings.php file at ./sites/default/settings.php.
Command pm-enable needs a higher bootstrap level to run - you will need invoke drush from a more functional Drupal environment to run this command.
The drush command 'en module' could not be executed.

This comment helped me.

Posted by dnotes on May 13, 2010 at 9:29am

This comment helped me. Seems odd that drush would not have more friendly defaults, so I'm wondering if I still have something wrong with my system.

Run command from /sites/example.com

Posted by StuddMan on April 28, 2010 at 1:03pm

You have to run Drush from the site directory you want to add the modules to so drush has some context, for example:

To load modules for all sites in a platform:

From the platform root
cd sites/all
Drush dl module_name

To load modules for a particular site only in a platform

From the platform root
cd sites/example.com
Drush dl module_name

drush help dl "Quickly

Posted by j2parker on April 28, 2010 at 1:23pm

drush help dl

"Quickly download projects (modules, themes, profiles, translations) from drupal.org. Automatically figures out which module version you want based on its latest release, or you may specify a particular version. Downloads drupal core as well. If no destination is provided, defaults to a site specific modules directory if available, then to sites/all/modules if available, then to the current working directory."

Aegir hosting system

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /