AWS Elastic Beanstalk“composer install”找不到包

Posted

技术标签:

【中文标题】AWS Elastic Beanstalk“composer install”找不到包【英文标题】:AWS Elastic Beanstalk "composer install" fails to find packages 【发布时间】:2013-08-24 03:40:42 【问题描述】:

我正在使用 git 将 Laravel 应用程序部署到 Elastic Beanstalk,但是该应用程序总是无法部署。我检查了日志,这是我得到的错误:

Problem 1
- The requested package laravel/framework could not be found in any version, there may be       a typo in the package name.
Problem 2
- The requested package laravelbook/ardent could not be found in any version, there may be a typo in the package name.
Problem 3
- The requested package machuga/authority-l4 could not be found in any version, there may  be a typo in the package name.
Problem 4
- The requested package way/generators could not be found in any version, there may be a typo in the package name.
Problem 5
- The requested package jonob/restful could not be found in any version, there may be a typo in the package name.
Problem 6
- The requested package intervention/image could not be found in any version, there may be a typo in the package name.
Problem 7
- cartalyst/api 1.0.x-dev requires illuminate/container 4.0.* -> no matching package found.
- cartalyst/api v1.0.0 requires illuminate/container 4.0.* -> no matching package found.
- Installation request for cartalyst/api 1.0.* -> satisfiable by cartalyst/api v1.0.0, cartalyst/api 1.0.x-dev.

这是我的 composer.json 文件:


"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"require": 
    "laravel/framework": "4.0.*",
        "laravelbook/ardent": "dev-master",
    "cartalyst/sentry": "2.0.*",
        "cartalyst/api": "1.0.*",
        "machuga/authority-l4" : "dev-master",
        "way/generators": "dev-master",
        "jonob/restful": "dev-master",
        "intervention/image": "dev-master"
,
"autoload": 
    "classmap": [
        "app/commands",
        "app/controllers",
        "app/models",
        "app/database/migrations",
        "app/database/seeds",
        "app/tests/TestCase.php"
    ]
,
"scripts": 
    "post-install-cmd": [
        "php artisan optimize"
    ],
    "pre-update-cmd": [
        "php artisan clear-compiled"
    ],
    "post-update-cmd": [
        "php artisan optimize"
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ]
,
"config": 
    "preferred-install": "dist"
,
    "repositories": [
    
        "type": "composer",
        "url": "http://packages.cartalyst.com"
    
    ],
"minimum-stability": "dev"

似乎可以找到 cartalyst 包,所以也许我需要为其他包指定一个存储库?如果是这样,那个存储库会是什么?

【问题讨论】:

【参考方案1】:

我发现了问题所在。 composer.lock 文件位于 .gitignore 中,因此 AWS 上的 composer 没有得到它...有关更多详细信息,请参见此处:http://www.michaelgallego.fr/blog/2013/08/19/solving-the-elastic-beanstalk-composer-deployment-problems/

【讨论】:

以上是关于AWS Elastic Beanstalk“composer install”找不到包的主要内容,如果未能解决你的问题,请参考以下文章

AWS Elastic Beanstalk 外部 DNS 未正确路由

使用 AWS 和 Elastic Beanstalk 的 Websocket

AWS Elastic Beanstalk - 错误 requirements.txt

AWS Elastic Beanstalk 上禁止使用 Django 403

AWS EC2 / Elastic Beanstalk |如何按域列入白名单?

AWS Elastic Beanstalk:WSGI 路径不正确?