0

I just installed Drush (globally) as described here: http://docs.drush.org/en/master/install/, on Ubuntu 14.04 (PHP 5.5.9).

Then I created a new Drupal 8 web site and database with:

$ drush dl drupal --drupal-project-rename=example $ drush si standard \ --db-url='mysql://[db_user]:[db_pass]@localhost/[db_name]' --site-name=Example 

When I run the built-in server within the project directory:

$ drush rs 8000 

And I try to access http://localhost:8000, I get this error:

PHP Warning: Unknown: failed to open stream: phar error: invalid url or non-existent phar phar:///usr/local/bin/drush/commands/runserver/d8-rs-router.php in Unknown on line 0
PHP Fatal error: Unknown: Failed opening required 'phar:///usr/local/bin/drush/commands/runserver/d8-rs-router.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0

What's wrong?

1
  • 1
    I believe this is an incompatibility between the runserver command's implementation and phar bundling. This will need to be fixed in Drush. See github.com/drush-ops/drush/issues/2090 Commented Apr 11, 2016 at 16:51

1 Answer 1

5

I solved installing the last version of Drush via composer:

$ # Remove previous drush installation file $ sudo rm /usr/local/bin/drush $ # Install drush globally via composer $ composer global require drush/drush $ ln -s ~/.composer/vendor/bin/drush ~/bin/drush 

Now it works.

1
  • Don't forget to set your answer as correct. Commented Apr 10, 2016 at 13:50

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.