Problem: run, then error occurred composer require drush/drush:
composer require drush/drush
Solution: run composer with the following pattern instead:
php -d memory_limit=-1 /usr/local/bin/composer update .....