steve
steve

Reputation: 1418

Laravel Error: Please provide a valid cache path

I cloned a Laravel 5.2 project.

When I execute composer install, I got the error:

  [InvalidArgumentException]
  Please provide a valid cache path. 

Theses folders are exists:

storage/app
storage/framework
storage/logs

bootstrap/cache

and its all 777.

How can i fixed this error!

Upvotes: 11

Views: 39660

Answers (5)

Anas Salama
Anas Salama

Reputation: 64

After add missing folders do these commands :

1- php artisan config:cache 2 - php artisan cache:clear

These steps work for me

Upvotes: 0

Bercove
Bercove

Reputation: 1175

Laravel is telling you that is missing the valid cache folder which is located in storage then create the following folders

sudo mkdir storage/framework
sudo mkdir storage/framework/sessions
sudo mkdir storage/framework/views
sudo mkdir storage/framework/cache
sudo mkdir storage/framework/cache/data

So remember to change the permission as follow

sudo chmod -R 777 storage

After run

composer update 

or run the following command in terminal

php artisan cache:clear
php artisan config:clear 
php artisan view:clear 

Upvotes: 1

Sohail Ahmed
Sohail Ahmed

Reputation: 1486

Run these commands in your terminal.

cd storage/
mkdir -p framework/{sessions,views,cache}


chmod -R 775 framework
chown -R www-data:www-data framework

Corrected: The folder name 'session' to 'sessions'. The username can be 'apache'. You may also need to create the data folder within storage/framework/cache.

Upvotes: 7

OmidDarvishi
OmidDarvishi

Reputation: 650

Try the following:

create these folders under storage/framework:

  • sessions
  • views
  • cache

Now it should work

Upvotes: 2

steve
steve

Reputation: 1418

I fixed it.

Create these folders under storage/framework:

sessions
views
cache

And also you can use this command to install:

sudo composer install

Now its worked!

Upvotes: 46

Related Questions