Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

artisan clear-compiled return error code 255

When runnning composer install on my laravel project I get the error:

Script php artisan clear-compiled handling the post-install-cmd event returned with error code 255

Any advice on what could be the issue? Note composer installs all the vendor packages. The full output is below:

[user@some_path]$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
> php artisan clear-compiled
Script php artisan clear-compiled handling the post-update-cmd event returned with error code 255

like image 626
sazr Avatar asked Mar 03 '17 03:03

sazr


2 Answers

Makse sure your storage/ & bootstrap/cache directory writeable.

Make sure your .env file doesent contain any spaces.

Ex: key=value istead of key=va lue

remove the bootstrap/cache/config.php file. then

composer dumpautoload
composer update

Try to remove /bootstrap/compiled.php ( if you have it )

like image 161
Zoltán Jére Avatar answered Sep 23 '22 03:09

Zoltán Jére


step 1 - Check your php version. If your laravel is old , then it wont support 7.x, you need to switch (check this if you are using mac) to PHP 5.6 in this case.

Step 2 - remove composer.lock and run composer install

like image 29
Serjas Avatar answered Sep 22 '22 03:09

Serjas