前面加上 COMPOSER_MEMORY_LIMIT=-1 可以这样执行 COMPOSER_MEMORY_LIMIT=-1 composer require "laravel/horizon:~3.1"