0

I have installed new D8 on a remote server using this way https://github.com/drupal-composer/drupal-project . I have pulled files from GitHub and I have run 'composer install' for getting the all vendor files include the local Drush (/vendor/drush/drush/) When I run 'drush status' or 'drush core-status' on the root (or '/web') website directory I have:

vagrant@drupalvm8:/var/www/drupalvm/test8$ drush core-status
PHP Warning:  pcntl_exec(): Error has occurred: (errno 8) Exec format error in /usr/local/share/drush/includes/startup.inc on line 412
Warning: pcntl_exec(): Error has occurred: (errno 8) Exec format error in /usr/local/share/drush/includes/startup.inc on line 412
Error has occurred executing the Drush script found at /var/www/drupalvm/test8/vendor/bin/drush.launcher (errno 8) Exec format error
2
  • It was some my error. The problem disappeared after repeating: ' git pull, composer install ' from scratch.
    – Artu
    Commented Sep 29, 2016 at 5:27
  • Possible duplicate of Difficulties install Drush using composer
    – kenorb
    Commented Mar 30, 2019 at 23:05

1 Answer 1

1

This Drush issue has been fixed in the recent version (8.1.5 and above) by refactoring how the code was using Phar class.

Here are updated steps how to install Drush using phar (as per install.md):

# Download latest stable release using the code below or browse to github.com/drush-ops/drush/releases.
php -r "readfile('http://files.drush.org/drush.phar');" > drush
# Or use our upcoming release: php -r "readfile('http://files.drush.org/drush-unstable.phar');" > drush

# Test your install.
php drush core-status

# Make `drush` executable as a command from anywhere. Destination can be anywhere on $PATH.
chmod +x drush
sudo mv drush /usr/local/bin

# Optional. Enrich the bash startup file with completion and aliases.
drush init

Or by the following one-liner:

sudo install <(curl http://files.drush.org/drush.phar) /usr/local/bin/drush

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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