After updating my Mac from Yosemite to El Capitan, I am noticing drush does not run properly on any of my sites. Doing a simple:
drush status-report Command core-requirements needs a higher bootstrap level to run - you[error] will need to invoke drush from a more functional Drupal environment to run this command. The drush command 'status-report' could not be executed. [error] Drush was not able to start (bootstrap) the Drupal database. [error] Hint: This may occur when Drush is trying to: * bootstrap a site that has not been installed or does not have a configured database. In this case you can select another site with a working database setup by specifying the URI to use with the --uri parameter on the command line. See `drush topic docs-aliases` for details. * connect the database through a socket. The socket file may be wrong or the php-cli may have no access to it in a jailed shell. See http://drupal.org/node/1428638 for details.
This is now happening on all my Drupal sites locally, and yes, I am at the root of the Drupal install directory where this command would normally work. I've updated Composer and made sure that stable Drush 7.0.0 is running. Has anyone else come across this behaviour?
Fortunately, I made a full bootable backup of Yosemite so I will 'simply' roll my Mac back to how it was setup prior to the so-called upgrade of El Capitan. Normally I wait at least a month or two before upgrading to Apple's latest release but I got reckless and now this is the price. Sometimes I just want to switch to Ubuntu full time and say goodbye to the Mac OS.
- Mac OS 10.11
- MAMP PRO 3.2.1
- Little Snitch 3.6 (mentioning this because of this thread)
- Composer version 1.0-dev
- Drush 7.0.0
2015-10-17 - Update #################################
First off, thank you for the folks who commented on the original issue. I have decided for better or worse to try again. I updated Yosemite, where Drush, Mamp and everything was working fine, to El Capitan.
I removed drush by editing the .json file for composer by removing the lines for drush and then running
composer global update which then finished the job by removing the actual drush files. Composer is up to date, and then drush7 was installed successfully with
composer global require drush/drush:7.0.0
However, once I navigate to a directory with a Drupal install, I am told after running some commands that 'No drupal site was found' and yet, the commands seem to complete regardless. Here are some examples:
drush cron results in the following:
No Drupal site found, only 'drush' cache was cleared. 'all' cache was cleared.
drush updb results in the following:
No database updates required No Drupal site found, only 'drush' cache was cleared. 'all' cache was cleared.
drush dl hacked results in the following:
Project hacked (7.x-2.0-beta5) downloaded to /Users/[me]/Sites/[path]/drupal/sites/all/modules/contrib/hacked
Note there was no 'drupal not found' message on the last command. So, my concern is why the 'No Drupal site found' message is showing up. Here is what my .bash_profile looks like:
export PATH="/Applications/MAMP/bin/php/php5.4.42/bin:$HOME/.composer/vendor/bin:$PATH" export PATH export DRUSH_PHP='/Applications/MAMP/bin/php/php5.4.42/bin/php' export PATH=/usr/local/bin:$PATH
None of these settings were changed from how it was in Yosemite. If anyone can shed some light on these issues, I'd really appreciate it. Thanks again.