gpt4 book ai didi

php - Laravel 5 composer 安装失败(psysh、php-parser、ext-tokenizer 错误)

转载 作者:可可西里 更新时间:2023-10-31 22:10:58 24 4
gpt4 key购买 nike

运行 $ 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.

我在 OSX 10.10 上全新全局和本地安装了 Composer。它们都输出相同的错误,并且安装失败。

我也试过 git 克隆 laravel 然后运行 ​​composer install 但我得到了同样的错误。

最佳答案

“Psy/psysh”需要“nikic/php-parser”,而这个需要“ext-tokenizer”。从 PHP 添加/启用“ext-tonkenizer”扩展,一切都会正常工作。

关于php - Laravel 5 composer 安装失败(psysh、php-parser、ext-tokenizer 错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28914789/

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