Laravel 5.1 部署您的要求无法解析为可安装的软件包集

Laravel 5.1 部署您的要求无法解析为可安装的软件包集

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

错误:

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.

当我尝试安装 php-gd 或 dom 时出现此错误:

Error: php56w-common conflicts with php-common-5.4.16-36.el7_1.x86_64

我的 php 版本:(php -v)

PHP 5.6.14 (cli) (built: Oct 16 2015 07:11:57)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

rpm -qa | grep php 的结果:

php56w-mbstring-5.6.14-2.w7.x86_64
php56w-cli-5.6.14-2.w7.x86_64
php56w-common-5.6.14-2.w7.x86_64
php56w-5.6.14-2.w7.x86_64
php56w-opcache-5.6.14-2.w7.x86_64

答案1

尝试删除 php-common-5.4* 并重新运行安装。在安装替换之前,必须删除旧的 PHP 包。

相关内容