0

I am trying to make drush work on Debian 8 with Drupal 8.

Unluckily, executing drush entity-updates returns the following error messages:

Command entity-updates needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.
Command entity-updates requires Drupal core version 8+ to run.
The drush command 'entity-updates' could not be executed.

drush -vd status executed from .../sites/default returns the following:

.../sites/default# drush -vd status
Starting Drush preflight. [0.04 sec, 2.09 MB]                        [preflight]
Loading drushrc "/etc/drush/drushrc.php" into "system" scope. [0.04  [bootstrap]
sec, 2.09 MB]
Cache MISS cid: 7.1.0-commandfiles-0-81cc86c1995ab7206f383ec28ad43baf    [debug]
[0.09 sec, 2.14 MB]
Cache SET cid: 7.1.0-commandfiles-0-81cc86c1995ab7206f383ec28ad43baf     [debug]
[0.12 sec, 2.16 MB]
Bootstrap to phase 0. [0.53 sec, 6.04 MB]                            [bootstrap]
Found command: core-status (commandfile=core) [0.54 sec, 6.05 MB]    [bootstrap]
Loading outputformat engine. [0.54 sec, 6.06 MB]                        [notice]
Calling hook drush_core_status [0.55 sec, 6.11 MB]                       [debug]
Returned from hook drush_core_status [0.55 sec, 6.11 MB]                 [debug]
 PHP executable         :  /usr/bin/php
 PHP configuration      :  /etc/php5/cli/php.ini
 PHP OS                 :  Linux
 Drush script           :  /root/.composer/vendor/drush/drush/drush.php
 Drush version          :  7.1.0
 Drush temp directory   :  /tmp
 Drush configuration    :  /etc/drush/drushrc.php
 Drush alias files      :

Command dispatch complete [0.63 sec, 6.25 MB]                           [notice]

Running drush sqlc executed from .../sites/default results in:

Unable to load class Drush\Sql\Sql                                   [error]
exception 'Drush\Sql\SqlException' with message 'Unable to find a    [error]
matching SQL Class. Drush cannot find your database connection
details.' in
/root/.composer/vendor/drush/drush/commands/sql/sql.drush.inc:597
Stack trace:
#0
/root/.composer/vendor/drush/drush/commands/sql/sql.drush.inc(454):
drush_sql_get_class()
#1 [internal function]: drush_sql_cli()
#2 /root/.composer/vendor/drush/drush/includes/command.inc(359):
call_user_func_array('drush_sql_cli', Array)
#3 /root/.composer/vendor/drush/drush/includes/command.inc(210):
_drush_invoke_hooks(Array, Array)
#4 [internal function]: drush_command()
#5 /root/.composer/vendor/drush/drush/includes/command.inc(178):
call_user_func_array('drush_command', Array)
#6
/root/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(62):
drush_dispatch(Array)
#7 /root/.composer/vendor/drush/drush/drush.php(70):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#8 /root/.composer/vendor/drush/drush/drush.php(11): drush_main()
#9 {main}

I have read other topics but none of the solutions seems work.

I have installed Drush according to instructions provided here How to install drush 8 properly on Debian 8?.

  • Try: drush -vd status first. Normally you should have Drupal bootstrap: Successful, so you've to find the reason why it's not bootstraping properly. Try also running in top-level of your site dir. – kenorb Oct 29 '15 at 19:53
  • What folder are you in when you're running drush? ~? The Drupal root? Your site directory? – Erin McLaughlin Oct 29 '15 at 20:24
  • @ErinMcLaughlin The folder was available in the previous edit revision (sites/default). – kenorb Oct 29 '15 at 20:37
  • If the cwd was in fact sites/default, then drush status should have reported the Drupal root folder, at least. Check the cwd and try again? – greg_1_anderson Oct 29 '15 at 21:28
  • @Abdel5 Can you check connectivity to the db: drush sqlc or $(drush sql-connect)? Are you usually running drush via root? You're not overriding anything weird in /etc/drush/drushrc.php? I think it can't find Drupal core files properly, as it doesn't go to phase 1. Can you confirm the dir in which you run? – kenorb Oct 29 '15 at 22:25
0

Same problem here.

In my case I discovered that drush uses native mysql commands, not php lib. Then I've installed by

apt-get install mysql-client

and works great.

For windows users, I think must install mysql cli commands here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.