Remove old versions, I removed the conflicts with the following commands:
$ composer global remove drush/drush $ composer global remove package/package
Install Drush with Composer
$ composer require drush/drush:9.*
You can query Composer to find where it has set the user $COMPOSER_HOME directory.
composer config --list --global
To update to a newer version
composer global update
- Run composer install for a new project or composer update for an existing one. Do so from the same directory as composer.json.