Laravel设置:无法安装Monolog

时间:2014-06-21 13:45:45

标签: php laravel laravel-4

我只是尝试按照文档(http://laravel.com/docs/quick#installation - “Via Composer”)中的描述安装Laravel的新实例。从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
嗯,现在该怎么办?试图将其发布在官方论坛上但由于那里的错误而无法实现(论坛基于Laravel ......是的,这就是Karma!)。

1 个答案:

答案 0 :(得分:0)

解决方案:“composer dumpautoload -o”