我已根据https://getcomposer.org/doc/00-intro.md#globally上的说明全局安装了Composer,然后尝试安装drush。不幸的是,drush无法安装,给出以下错误:
composer install
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 symfony/console v3.0.1 -> satisfiable by symfony/console[v3.0.1].
- symfony/console v3.0.1 requires php >=5.5.9 -> your PHP version (5.4.16) or value of "config.platform.php" in composer.json does not satisfy that requirement.
Problem 2
- symfony/console v3.0.1 requires php >=5.5.9 -> your PHP version (5.4.16) or value of "config.platform.php" in composer.json does not satisfy that requirement.
- psy/psysh v0.6.1 requires symfony/console ~2.3.10|^2.4.2|~3.0 -> satisfiable by symfony/console[v3.0.1].
- Installation request for psy/psysh v0.6.1 -> satisfiable by psy/psysh[v0.6.1].
即使http://docs.drush.org/en/master/install列出:
Drush 8 master PHP 5.4.5+
我的环境是:
CentOS Linux release 7.2.1511 (Core)
php -v
PHP 5.4.16 (cli) (built: Jun 23 2015 21:17:27)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
并且很遗憾我无法升级PHP,因为我需要严格遵循RHEL / CentOS官方版本。
然后我决定尝试Drush 7.x分支,不幸的是它也给了:
composer install
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 symfony/console v3.0.1 -> satisfiable by symfony/console[v3.0.1].
- symfony/console v3.0.1 requires php >=5.5.9 -> your PHP version (5.4.16) or value of "config.platform.php" in composer.json does not satisfy that requirement.
Problem 2
- symfony/console v3.0.1 requires php >=5.5.9 -> your PHP version (5.4.16) or value of "config.platform.php" in composer.json does not satisfy that requirement.
- psy/psysh v0.6.1 requires symfony/console ~2.3.10|^2.4.2|~3.0 -> satisfiable by symfony/console[v3.0.1].
- Installation request for psy/psysh v0.6.1 -> satisfiable by psy/psysh[v0.6.1].
在这种情况下我该怎么做?
答案 0 :(得分:1)
composer global require drush/drush:dev-master
如果您需要特定版本,请执行此操作,例如版本7的最新版本:
composer global require drush/drush:7.*