简体   繁体   中英

Laravel Setup: Can't install Monolog

I just tried to install a fresh instance of Laravel as described in the docs ( http://laravel.com/docs/quick#installation - "Via Composer"). Got this error from Composer:

...
Writing lock file
Generating autoload files
PHP Fatal error:  Class 'Monolog\Logger' not found in ...\src\vendor\laravel\framework\src\Illuminate\Log\LogServiceProvider.php on line 23
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'Monolog\\Logger' not found","file":"...\\src\\vendor\\laravel\\framework\\src\\Illuminate\\Log\\LogServiceProvider.php","line":23}}Script php artisan clear-c
ompiled handling the post-install-cmd event returned with an error: PHP Fatal error:  Class 'Monolog\Logger' not found in ...\src\Illuminate\Log\LogServiceProvider.php on line 23

PHP Fatal error:  Class 'Monolog\Logger' not found in ...\src\Illuminate\Log\LogServiceProvider.php on line 23
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'Monolog\\Logger' not found","file":"...\\src\\vendor\\laravel\\framework\\src\\Illuminate\\Log\\LogServiceProvider.php","line":23}}Script php artisan optimiz
e handling the post-install-cmd event returned with an error: PHP Fatal error:  Class 'Monolog\Logger' not found in ...\src\Illuminate\Log\LogServiceProvider.php on line 23

Uhm, what to do now? Tried to post it on the official forums but that wasn't possible due to an error there (forums are based on Laravel... yeah that's Karma!).

解决方案:“ composer dumpautoload -o”

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM