我尝试使用DSM 6在我的Synology NAS上的Web Station上安装Laravel。安装作曲家后,我运行命令composer create-project laravel/laravel web-project
,但我得到的只是这个错误。
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework v5.3.0 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- laravel/framework v5.3.1 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- laravel/framework v5.3.10 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- laravel/framework v5.3.11 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- laravel/framework v5.3.12 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- laravel/framework v5.3.13 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- laravel/framework v5.3.14 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- laravel/framework v5.3.15 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- laravel/framework v5.3.16 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- laravel/framework v5.3.17 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- laravel/framework v5.3.18 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- laravel/framework v5.3.2 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- laravel/framework v5.3.3 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- laravel/framework v5.3.4 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- laravel/framework v5.3.5 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- laravel/framework v5.3.6 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- laravel/framework v5.3.7 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- laravel/framework v5.3.8 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- laravel/framework v5.3.9 requires classpreloader/classpreloader ~3.0 -> satisfiable by classpreloader/classpreloader[3.0.0].
- classpreloader/classpreloader 3.0.0 requires nikic/php-parser ^1.0|^2.0 -> satisfiable by nikic/php-parser[v1.0.0, v1.0.1, v1.0.2, v1.1.0, v1.2.0, v1.2.1, v1.2.2, v1.3.0, v1.4.0, v1.4.1, v2.0.0, v2.0.1, v2.1.0, v2.1.1].
- nikic/php-parser v2.1.1 requires ext-tokenizer * -> the requested PHP extension tokenizer is missing from your system.
- nikic/php-parser v2.1.0 requires ext-tokenizer * -> the requested PHP extension tokenizer is missing from your system.
- nikic/php-parser v2.0.1 requires ext-tokenizer * -> the requested PHP extension tokenizer is missing from your system.
- nikic/php-parser v2.0.0 requires ext-tokenizer * -> the requested PHP extension tokenizer is missing from your system.
- nikic/php-parser v1.4.1 requires ext-tokenizer * -> the requested PHP extension tokenizer is missing from your system.
- nikic/php-parser v1.4.0 requires ext-tokenizer * -> the requested PHP extension tokenizer is missing from your system.
- nikic/php-parser v1.3.0 requires ext-tokenizer * -> the requested PHP extension tokenizer is missing from your system.
- nikic/php-parser v1.2.2 requires ext-tokenizer * -> the requested PHP extension tokenizer is missing from your system.
- nikic/php-parser v1.2.1 requires ext-tokenizer * -> the requested PHP extension tokenizer is missing from your system.
- nikic/php-parser v1.2.0 requires ext-tokenizer * -> the requested PHP extension tokenizer is missing from your system.
- 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.
- Installation request for laravel/framework 5.3.* -> satisfiable by laravel/framework[v5.3.0, v5.3.1, v5.3.10, v5.3.11, v5.3.12, v5.3.13, v5.3.14, v5.3.15, v5.3.16, v5.3.17, v5.3.18, v5.3.2, v5.3.3, v5.3.4, v5.3.5, v5.3.6, v5.3.7, v5.3.8, v5.3.9].
To enable extensions, verify that they are enabled in those .ini files:
- /etc/php/php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
还检查了我的Web Station配置,发现遗留的tokenizer扩展名没有,但我看不到安装它的选项。
所以,我的问题是:如何在Synology NAS上将tokenizer扩展添加到PHP? PHP版本是5.6。
由于
答案 0 :(得分:1)
你必须使用php56而不是php命令。 例子:php56 composer.phar create-project laravel / laravel theproject“5.2。*”
答案 1 :(得分:-1)
运行composer self-update
然后尝试在新文件夹中创建项目。
并且失败,您可以将laravel版本更改为下面的版本,例如composer create-project laravel/laravel web-project "5.2.*"