gpt4 book ai didi

php - Laravel 部署您的要求无法解决为一组可安装的包

转载 作者:可可西里 更新时间:2023-11-01 12:38:40 24 4
gpt4 key购买 nike

当我尝试部署我的 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"
}

}

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

最佳答案

首先运行这两个命令来安装 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 .

关于php - Laravel 部署您的要求无法解决为一组可安装的包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33854262/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com