【问题标题】:Laravel deployement Your requirements could not be resolved to an installable set of packagesLaravel 部署您的需求无法解析为一组可安装的软件包
【发布时间】:2016-02-24 13:39:04
【问题描述】:

当我尝试部署我的 laravel 项目并执行 php composer.phar 安装时,我收到了这个烦人的错误。我通过带有 git clone 的 git 拉入我的项目。当我浏览我的域名时,我很想看到我的应用程序:)。我已经安装了正确版本的 apache、mysql 和 php。一切都已启动并正在运行。

编辑我如何安装 gd 和 dom?

当我执行 yum install php-gd 我得到这个错误: 错误:php56w-common 与 php-common-5.4.16-36.el7_1.x86_64 冲突

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for brianmcdo/image-palette dev-master -> satisfiable by brianmcdo/image-palette[dev-master].
- brianmcdo/image-palette dev-master requires ext-gd * -> the requested PHP extension gd is missing from your system.
Problem 2
- Installation request for phpunit/phpunit 4.8.18 -> satisfiable by phpunit/phpunit[4.8.18].
- phpunit/phpunit 4.8.18 requires ext-dom * -> the requested PHP extension dom is missing from your system.

我的 composer.json

"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.1.*",
    "creativeorange/gravatar": "~1.0",
    "illuminate/html": "^5.0",
    "laravelcollective/html": "^5.1",
    "intervention/image": "^2.3",
    "brianmcdo/image-palette": "dev-master",
    "weblee/mandrill": "dev-master",
    "behat/behat": "^3.0",
    "behat/mink": "^1.6",
    "behat/mink-extension": "^2.0",
    "behat/mink-selenium2-driver": "1.2.0"
},
"require-dev": {
    "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"
}

}

任何人都可以帮助我!非常感谢!

【问题讨论】:

  • 需要安装ext-mbstring和ext-gd。使用你的包管理器来安装它们。
  • 我对 centos 和 laravel 有点陌生,但我假设我用这样的东西安装它? yum install 包名?
  • 我收到此错误错误:当我尝试安装 php-mbstring 和 php-gd 时,php56w-common 与 php-common-5.4.16-36.el7_1.x86_64 发生冲突
  • @MoussaChaabar 首先运行“sudo yum remove php-common”然后运行“sudo yum install php-mbstring”它会自动安装依赖项(php-common)
  • 好的,我已经完成了。我现在可以安装 php composer.phar 吗?

标签: php laravel deployment linode


【解决方案1】:

首先运行这两个命令来安装 PHP 5.5 的 RPM:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

然后运行:

yum install php-gd

更多详情,请查看this thread

【讨论】:

    猜你喜欢
    • 2015-06-20
    • 1970-01-01
    • 2016-11-20
    • 1970-01-01
    • 2015-08-22
    • 1970-01-01
    • 2018-04-18
    • 2021-10-28
    • 1970-01-01
    相关资源
    最近更新 更多