Composer update -vvv not working

I installed composer worldwide on ubuntu 14.04. When I run the composer --version it works with the following output

Composer version 1.0-dev (45b1f356c24d87788a339f6a50d6d78bef464c47) 2015-02-27 14:31:27

But when I run the following composer -vvv update command

It gives the following error:

Failed to initialize global composer: Composer could not find the config file: /home/enamul/.composer/composer.json
To initialize a project, please create a composer.json file as described in the http://getcomposer.org/ "Getting Started" section

I have no idea why this is happening. Can anyone help me with this.

thank

+4
source share
2 answers

Just put the empty JSON object in your global configuration.

echo "{}" > ~/.composer/composer.json

The composer will combine this configuration with your composer.json project when running the install and update commands.

From the docs https://getcomposer.org/doc/03-cli.md#composer-home

+5

, :

cd /opt/lampp/htdocs/myproject
ls -al
cat composer.json

. , composer.json, , .

composer update

, - , , , . .

+1

All Articles