首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Laravel5.2 Heroku部署未能安装系统软件包

Laravel5.2 Heroku部署未能安装系统软件包
EN

Stack Overflow用户
提问于 2017-10-19 22:50:30
回答 1查看 969关注 0票数 0

我正在尝试将Laravel5.2项目部署到heroku,但我得到了以下错误

代码语言:javascript
复制
-----> PHP app detected
-----> Bootstrapping...
-----> Installing platform packages...
!     ERROR: Failed to install system packages.

   Your platform requirements (for runtimes and extensions) could
   not be resolved to an installable set of dependencies, or a
   repository was unreachable.

   Full error information from installation attempt:

   > Loading repositories with available runtimes and extensions
   > 
   > Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
   > Nothing to install or update
   > Generating autoload files

   Please verify that all requirements for runtime versions in
   'composer.lock' are compatible with the list below, and ensure
   all required extensions are available for the desired runtimes.

   For reference, the following runtimes are currently available:

   PHP:  7.1.10, 7.1.9, 7.1.8, 7.1.3, 7.1.2, 7.1.1, 7.0.24, 
   7.0.23, 7.0.22, 7.0.17, 7.0.16, 7.0.15, 5.6.31, 5.6.30, 
   5.5.38
   HHVM: 3.5.1

   For a list of supported runtimes & extensions on Heroku, please
   refer to: https://devcenter.heroku.com/articles/php-support
!     Push rejected, failed to compile PHP app.
!     Push failed

这是我的composer.json文件

代码语言:javascript
复制
{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.2.*",
        "barryvdh/laravel-ide-helper": "^2.1",
        "components/jquery": "2.1.4",
        "components/jqueryui": "1.11.4",
        "kodeine/laravel-acl": "^0.1.3",
        "laravelcollective/html": "5.2.*"
    },
    "require-dev": {
        "symfony/dom-crawler": "~3.0",
        "symfony/css-selector": "~3.0",
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~4.0",
        "phpspec/phpspec": "~2.1"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-install-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "pre-update-cmd": [
            "php artisan clear-compiled"
        ],
        "post-update-cmd": [
            "php artisan optimize"
        ],
        "post-root-package-install": [
            "php -r \"copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    }
}

在使用composer安装、composer更新、composer更新-lock之后,我已经尝试了几十次部署,我甚至删除了composer.lock文件并再次运行了composer更新,但是这个错误不会发生。请帮帮我!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-04-25 06:16:41

结果发现,我的供应商文件夹没有在.gitignore文件中列出,而是与heroku上的其他文件一起推送的。一旦我将供应商文件夹添加到.gitignore中,一切都开始无缝地工作。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46840016

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档