运行$ composer create-project laravel/laravel
失败,返回错误:
Installing laravel/laravel (v5.0.1)
- Installing laravel/laravel (v5.0.1)
Downloading: 100%
Created project in /Users/androidu/Workspace/phpstorm/laravel
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework v5.0.6 requires psy/psysh 0.3.* -> satisfiable by psy/psysh[v0.3.0, v0.3.1, v0.3.2, v0.3.3, v0.3.4, v0.3.5].
- laravel/framework v5.0.5 requires psy/psysh 0.3.* -> satisfiable by psy/psysh[v0.3.0, v0.3.1, v0.3.2, v0.3.3, v0.3.4, v0.3.5].
- laravel/framework v5.0.4 requires psy/psysh 0.3.* -> satisfiable by psy/psysh[v0.3.0, v0.3.1, v0.3.2, v0.3.3, v0.3.4, v0.3.5].
- laravel/framework v5.0.3 requires psy/psysh 0.3.* -> satisfiable by psy/psysh[v0.3.0, v0.3.1, v0.3.2, v0.3.3, v0.3.4, v0.3.5].
- laravel/framework v5.0.2 requires psy/psysh 0.3.* -> satisfiable by psy/psysh[v0.3.0, v0.3.1, v0.3.2, v0.3.3, v0.3.4, v0.3.5].
- laravel/framework v5.0.1 requires psy/psysh 0.3.* -> satisfiable by psy/psysh[v0.3.0, v0.3.1, v0.3.2, v0.3.3, v0.3.4, v0.3.5].
- laravel/framework v5.0.0 requires psy/psysh 0.3.* -> satisfiable by psy/psysh[v0.3.0, v0.3.1, v0.3.2, v0.3.3, v0.3.4, v0.3.5].
- laravel/framework v5.0.10 requires psy/psysh 0.4.* -> satisfiable by psy/psysh[v0.4.0, v0.4.1].
- laravel/framework v5.0.11 requires psy/psysh 0.4.* -> satisfiable by psy/psysh[v0.4.0, v0.4.1].
- laravel/framework v5.0.12 requires psy/psysh 0.4.* -> satisfiable by psy/psysh[v0.4.0, v0.4.1].
- laravel/framework v5.0.13 requires psy/psysh 0.4.* -> satisfiable by psy/psysh[v0.4.0, v0.4.1].
- laravel/framework v5.0.14 requires psy/psysh 0.4.* -> satisfiable by psy/psysh[v0.4.0, v0.4.1].
- laravel/framework v5.0.7 requires psy/psysh 0.4.* -> satisfiable by psy/psysh[v0.4.0, v0.4.1].
- laravel/framework v5.0.8 requires psy/psysh 0.4.* -> satisfiable by psy/psysh[v0.4.0, v0.4.1].
- laravel/framework v5.0.9 requires psy/psysh 0.4.* -> satisfiable by psy/psysh[v0.4.0, v0.4.1].
- psy/psysh v0.3.1 requires nikic/php-parser ~1.0 -> satisfiable by nikic/php-parser[v1.0.0, v1.0.1, v1.0.2, v1.1.0].
- psy/psysh v0.3.2 requires nikic/php-parser ~1.0 -> satisfiable by nikic/php-parser[v1.0.0, v1.0.1, v1.0.2, v1.1.0].
- psy/psysh v0.3.3 requires nikic/php-parser ~1.0 -> satisfiable by nikic/php-parser[v1.0.0, v1.0.1, v1.0.2, v1.1.0].
- psy/psysh v0.3.4 requires nikic/php-parser ~1.0 -> satisfiable by nikic/php-parser[v1.0.0, v1.0.1, v1.0.2, v1.1.0].
- psy/psysh v0.3.5 requires nikic/php-parser ~1.0 -> satisfiable by nikic/php-parser[v1.0.0, v1.0.1, v1.0.2, v1.1.0].
- psy/psysh v0.4.0 requires nikic/php-parser ~1.0 -> satisfiable by nikic/php-parser[v1.0.0, v1.0.1, v1.0.2, v1.1.0].
- psy/psysh v0.4.1 requires nikic/php-parser ~1.0 -> satisfiable by nikic/php-parser[v1.0.0, v1.0.1, v1.0.2, v1.1.0].
- nikic/php-parser v1.1.0 requires ext-tokenizer * -> the requested PHP extension tokenizer is missing from your system.
- nikic/php-parser v1.0.2 requires ext-tokenizer * -> the requested PHP extension tokenizer is missing from your system.
- nikic/php-parser v1.0.1 requires ext-tokenizer * -> the requested PHP extension tokenizer is missing from your system.
- nikic/php-parser v1.0.0 requires ext-tokenizer * -> the requested PHP extension tokenizer is missing from your system.
- psy/psysh v0.3.0 requires jakub-onderka/php-console-highlighter dev-master -> no matching package found.
- Installation request for laravel/framework 5.0.* -> satisfiable by laravel/framework[v5.0.0, v5.0.1, v5.0.10, v5.0.11, v5.0.12, v5.0.13, v5.0.14, v5.0.2, v5.0.3, v5.0.4, v5.0.5, v5.0.6, v5.0.7, v5.0.8, v5.0.9].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
我有一个全新的全球&Composer在OSX 10.10上的本地安装。它们都输出相同的错误,并且安装失败。
我也尝试过git克隆laravel,然后运行composer install
,但我也遇到了同样的错误。
"Psy/psysh"需要"nikic/php解析器",而这个需要"ext tokenizer"。从PHP添加/启用"ext-tonkenizer"扩展,一切都会正常工作。
安装ext-tonkenizer
步骤:
cd /var/package/php-7.0.12/ext/tokenizer
/usr/local/php7/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config
make
make install
/usr/local/php7/bin/php -m | grep tokenizer
标记器