1

Tried to install composer in windows through command line. Downloaded composer.phar. Placed it in C/wamp/www/s/ folder. During installation got this error.

[RuntimeException] Error Output: make: *** No rule to make target `compile-json'. Stop.

What should I do now..?

This is my composer.json

{

"name": "aws/aws-sdk-php",
"homepage": "http://aws.amazon.com/sdkforphp",
"description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project",
"keywords": ["aws","amazon","sdk","s3","ec2","dynamodb","cloud","glacier"],
"type": "library",
"license": "Apache-2.0",
"authors": [
    {
        "name": "Amazon Web Services",
        "homepage": "http://aws.amazon.com"
    }
],
"support": {
    "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
    "issues": "https://github.com/aws/aws-sdk-php/issues"
},
"require": {
    "php": ">=5.5",
    "guzzlehttp/guzzle": ">=5.3|~6.0.1|~6.1",
    "guzzlehttp/guzzle":"~4.0",
    "guzzlehttp/psr7": "~1.0",
    "guzzlehttp/promises": "~1.0",
    "mtdowling/jmespath.php": "~2.2"
},
"require-dev": {
    "ext-openssl": "*",
    "ext-pcre": "*",
    "ext-spl": "*",
    "ext-json": "*",
    "ext-dom": "*",
    "ext-simplexml": "*",
    "phpunit/phpunit": "~4.0",
    "behat/behat": "~3.0",
    "doctrine/cache": "~1.4",
    "aws/aws-php-sns-message-validator": "~1.0"
},
"suggest": {
    "ext-openssl": "Allows working with CloudFront private distributions and     verifying received SNS messages",
    "ext-curl": "To send requests using cURL",
    "doctrine/cache": "To use the DoctrineCacheAdapter"
},
"autoload": {
    "psr-4": {
        "Aws\\": "src/"
    },
    "files": ["src/functions.php"]
},
"autoload-dev": {
    "psr-4": {
        "Aws\\Test\\": "tests/"
    }
},
"extra": {
    "branch-alias": {
        "dev-master": "3.0-dev"
    }
},
"scripts": {
    "post-autoload-dump": [
        "make compile-json"
    ]
}
}
Reaching-Out
  • 415
  • 6
  • 26
  • Please add all the commands you run "during installation". We can not help without steps to reproduce the issue. Did you execute `php composer.phar` on the CLI? – Jens A. Koch Sep 24 '15 at 13:04
  • C:\wamp\www\sep24\e> php composer.phar install { and then this error came.} – Reaching-Out Sep 24 '15 at 13:09
  • You error message looks like `make` is executed. That command is absolutely not involved here. Its strange. Where is your download from? Did you download this file: https://getcomposer.org/composer.phar ? I suggest to download the file again. I can not reproduce this issue. When you execute `php composer.phar install` in a directory without `composer.json` you will get the following message: `Composer could not find a composer.json file in [folder]`. – Jens A. Koch Sep 24 '15 at 13:13
  • I have composer.json in that folder – Reaching-Out Sep 24 '15 at 13:22
  • Ok, seems you have problems with your `composer.json` file and installing packages - and not installing Composer itself. Please post the content of your `composer.json` file. – Jens A. Koch Sep 24 '15 at 13:25
  • where to post the content ? – Reaching-Out Sep 24 '15 at 13:32
  • Please edit your question and append it. Copy paste the content, mark it as code by selecting the content and then pressing Ctrl+K. – Jens A. Koch Sep 24 '15 at 13:40
  • Did it. Please refer – Reaching-Out Sep 24 '15 at 13:49

1 Answers1

0

Thank you for posting your composer.json file.

The error comes from the following invalid entry:

"scripts": {
    "post-autoload-dump": [
        "make compile-json"
    ]
}

The make command will not work on Windows.

I suggest to simply remove this part of the file and try again.

(Its not clear to me, which of your project dependencies needs an additional make step and why you added it. Anyway this composer.json seems to be identical to https://github.com/aws/aws-sdk-php/blob/master/composer.json . If you want to contribute to this project ask them how to build on Windows :)


If you simply want to fetch the aws-sdk-php package. Follow their installation guide: http://docs.aws.amazon.com/aws-sdk-php/v3/guide/getting-started/installation.html

Use php composer.phar require aws/aws-sdk-php on the CLI.

Or add aws/aws-sdk-php to your require section and then run composer install, like so:

{
    "require": {
        "aws/aws-sdk-php": "^3.3"
    }
}
Marcin Nabiałek
  • 109,655
  • 42
  • 258
  • 291
Jens A. Koch
  • 39,862
  • 13
  • 113
  • 141