O
O
Omniverse2016-12-26 19:30:19
Composer
Omniverse, 2016-12-26 19:30:19

How to properly install Laravel via composer?

Hello.
I'm trying to install laravel project via composer:

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

It installs fine with sudo, although it's wrong to run composer with sudo.
But without sudo, it is installed incorrectly, it gives errors:
file_put_contents(/home/username/.composer/cache/repo/https---packagist.org/p-provider-2016-10.json): failed to open stream: Permission denied
http://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Your requirements could not be resolved to an installable set of packages.

How to fix this situation?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2016-12-26
@Omniverse

Good evening.
The error says that access is denied, insufficient rights.
Set write permissions for the directory and it will work

A
Alexander Sisyukin, 2016-12-26
@Caarl

Download composer.phar and access your team's php composer.phar through it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question