Drush 8 – Unable to load autoload.php


I’ve been using drush for several years with drupal 7 and all I have ever had to do is unpack the drush package into a sub-directory, in my case usually /www/drush/, and then run it from the root of my drupal sites. Now that I have a working drupal8 test site up and running, I’ve been screwing around all evening with trying to get drush 8 working before I begin experimenting with migrating real sites to drupal 8, and I feel more lost now than when I started.

Drush version: 8.x-20160728

Running drush 8 outputs this error,

Unable to load autoload.php. Run composer install to fetch dependencies and write this file (http://docs.drush.org/en/master/install-alternative/). Or if you prefer, use the drush.phar which already has depdencies included (http://docs.drush.org/en/master/install).

I’m finding postings saying,
Drush switched to requiring composer.

Composer project page

The project page for composer says

drush dl composer-8

I ran it from the root of the drush tree and it errors with,

No release history was found for the requested project (composer-8).

I downloaded composer-8.x-1.4.tar.gz from that project page and unpacked it and looked at the README.md file and it has the same instructions.

## Installation
drush dl composer-8.x-1.x

## Usage
drush composer

How am I supposed to use drush to download composer if composer is required to run drush?

Why would I need to use drush to download it when I already have it downloaded anyway? No instructions on how to manually install it once I have manually downloaded it. No ‘composer’ executable in the package. Only files like composer.drush.json, etc.

Also, the composer project page says

This project allows use of Composer from Drush.

So does that mean it is not required?

There’s a documentation site

that gives completely different instructions.

php -r “readfile(‘https://s3.amazonaws.com/files.drush.org/drush.phar‘);” > drush
chmod +x drush
sudo mv drush /usr/local/bin

Downloading from amazon rather than drupal.org ??

And those instructions are for installing drush, not composer.

Then on


I find a posting with a completely different set of instructions.

Install composer globally:
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Install drush globally (for your user), you can specify the version:
composer global require drush/drush:6.*

Add the composer path to your path (in your .bashrc or .zshrc or other):
export PATH=”$HOME/.composer/vendor/bin:$PATH”

OK, I tried that

$ curl -sS https://getcomposer.org/installer | php


Some settings on your machine make Composer unable to work properly. Make sure that you fix the issues listed below and run this script again:

The phar extension is missing.
Install it or recompile php without –disable-phar

The iconv OR mbstring extension is required and both are missing.
Install either of them or recompile php without –disable-iconv

The openssl extension is missing, which means that secure HTTPS transfers are impossible.

If possible you should enable it or recompile php with –with-openssl

Do an ‘ls’ of the directory I was in and no files.

Again. Wrong instructions. Doesn’t work.

Then on


Yet another completely different set of instructions and a different place to download it from.

Download Composer

php -r “copy(‘https://getcomposer.org/installer‘, ‘composer-setup.php’);”
php -r “if (hash_file(‘SHA384’, ‘composer-setup.php’) === ‘e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae’) { echo ‘Installer verified’; } else { echo ‘Installer corrupt’; unlink(‘composer-setup.php’); } echo PHP_EOL;”
php composer-setup.php
php -r “unlink(‘composer-setup.php’);”

Really? What the heck is all that? Why can’t I just ftp it or download it with the browser?
So, my questions are,

  • Is composer really required or is there some other problem causing the new drush to not work?
  • If composer is required, what is the official method of downloading and installing it, obviously without using drush if it’s required to run drush?
  • Why is all the documentation sending me in different directions to download from different sites and using different methods?
  • Drupal has been great up until now, but is the Drupal community really this disorganized with Drupal 8? Or am overlooking something really stupid?
Drupal version: 

Source: https://www.drupal.org/taxonomy/term/22/feed