0
votes

I have an error while installing laravel on CentOS Linux. When I trying to run this command

composer create-project laravel/laravel --prefer-dist

I have already install composer.

Compiling common classes
PHP Fatal error:  Cannot redeclare class Psr\Log\LoggerInterface in /home/abc/public_html/xyz/laravel/vendor/compiled.php on line 12297
PHP Stack trace:
PHP   1. {main}() /home/abc/public_html/xyz/laravel/artisan:0
PHP   2. require() /home/abc/public_html/xyz/laravel/artisan:16
PHP   3. require() /home/abc/public_html/xyz/laravel/bootstrap/autoload.php:34
Script php artisan key:generate handling the post-create-project-cmd event returned with an error

  [RuntimeException]
  Error Output: PHP Fatal error:  Cannot redeclare class Psr\Log\LoggerInterface in /home/abc/public_html/xyz/laravel/vendor/compiled.php on line 12297
  PHP Stack trace:
  PHP   1. {main}() /home/abc/public_html/xyz/laravel/artisan:0
  PHP   2. require() /home/abc/public_html/xyz/laravel/artisan:16
  PHP   3. require() /home/abc/public_html/xyz/laravel/bootstrap/autoload.php:34
1
Can you provide a php version? - vanadium23
PHP version is 5.4.x - Ali
Did you ensure that you're running a clean installation? This error is caused by the interface Psr\Log\LoggerInterface being declared multiple times. - Nahiyan
Yes I had deleted the folder several times and then again run the command which download laravels. - Ali

1 Answers

0
votes

I use complete package of laravel which is LaraPack. It provide you ready-to-use Laravel instalation, so you don't have install it with Composer. It also gets weekly update as mention by his creator.