Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I am on ubuntu
I followed these drush directions:
http://docs.drush.org/en/master/install/
cd ~/hostmaster-7.x-3.141
composer require drush/drush:8.x
cd ~/hostmaster-7.x-3.141/sites/myaegir.com
drush
The Drush launcher could not find a Drupal site to operate on. Please do *one* of the following:
- Navigate to any where within your Drupal project and try again.
- Add --root=/path/to/drupal so Drush knows where your site is located.
Neither of the above work
Drush works for my Drupal 8 sites.
Comments
Comment #2
helmo CreditAttribution: helmo at Initfour websolutions for Aegir Cooperative commentedthere might be some confusion here between site specific drush and globally installed drush. Both are possible now, and Drush 9 is moving to site specific only.
Aegir needs a global drush, which best can be installed as a phar file.
The Debian package currently downloads from https://github.com/drush-ops/drush/releases/download/8.1.16/drush.phar and stores it with execute permissions in /usr/local/bin/drush.
Comment #3
joestewart CreditAttribution: joestewart at Mediacurrent commentedhttps://github.com/drush-ops/drush/issues/2285 may be related.
Comment #4
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedi can't get drush.phar to work for drupal7 sites even hostmaster itself.
drush @hostmaster hosting-task --force --debug 6256
Drush Launcher Version: 0.5.1
ROOT: /var/aegir/hostmaster-7.x-3.144/sites/myaegir.com
The Drush launcher could not find a Drupal site to operate on. Please do *one* of the following:
- Navigate to any where within your Drupal project and try again.
- Add --root=/path/to/drupal so Drush knows where your site is located.
drush @hostmaster hosting-task --force --debug 6256 --root=/var/aegir/hostmaster-7.x-3.144/sites/myaegir.com
Drush Launcher Version: 0.5.1
ROOT: /var/aegir/hostmaster-7.x-3.144/sites/myaegir.com
The Drush launcher could not find a Drupal site to operate on. Please do *one* of the following:
- Navigate to any where within your Drupal project and try again.
- Add --root=/path/to/drupal so Drush knows where your site is located.
I've tried to install both of the following inside /var/aegir/hostmaster-7.x-3.144/sites/myaegir.com
cd /var/aegir/hostmaster-7.x-3.144/sites/myaegir.com
composer require drush/drush:7.x
then
composer require drush/drush:8.x
they both installed but I get the error above
Comment #5
joestewart CreditAttribution: joestewart at Mediacurrent commentedMaybe try the fallback environment variable for drush launcher.
https://github.com/drush-ops/drush-launcher/blob/master/README.md#fallback
Comment #6
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedTo get it to work for Drupal 7 sites i had to
composer require drush/drush 8.x
./vendor/drush/drush/drush hosting-task --force --debug 6256
Comment #7
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedafter getting it to run here is what I get on my screen:
The command could not be executed successfully (returned: Drush preflight prepare loaded autoloader at[error]
[preflight]
/var/aegir/hostmaster-7.x-3.144/sites/myaegir.com/vendor/autoload.php
[0.01 sec, 2.4 MB]
I have been disabling a number of modules.
Each one has a similar issue that looks like modules/module-name/drush and while I was able to disable other modules I need hosting_https
[0.01 sec, 2.69 MB] Include [notice] /modules/hosting_https/drush [0.01 sec, 2.69 MB] Cache HIT cid: 8.1.16-commandfiles-0-e500a56707edbe72da58fced0e6f986d [0.01 sec, 2.73 MB] [debug] Loading drushrc [bootstrap] "drupal-8.4.4/html/sites/all/drush/drushrc.php" into "drupal" scope. [0.04 sec, 5.69 MB] Scanning into /etc/drush for /.*aliases\.drush(8|)rc\.php$/ [0.08 sec, 10 MB] [debug] Scanning into /etc/drush for /self\.alias\.drush(8|)rc\.php$/ [0.08 sec, 10 MB]
I am running Ubuntu 14.04 and php 7.1
I am using drush.phar
and I have run "composer require drush/drush 8.x" in myaegir.com directory of hostmaster