无法使用 composer 创建 yii2 项目
could not create yii2 project with composer
我正在尝试使用 composer 创建一个 yii2 项目并收到此错误
我正在使用 ubuntu 16.04 LTS
错误:
https://pastebin.com/XgSt9Z2B
root@xuf-SATELLITE-C50t-A:/var/www/html/suppare# composer create-project --prefer-dist yiisoft/yii2-app-basic suppare
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Installing yiisoft/yii2-app-basic (2.0.14)
- Installing yiisoft/yii2-app-basic (2.0.14): Loading from cache
Created project in suppare
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- codeception/phpunit-wrapper 6.0.2 requires sebastian/diff ^3.0 -> satisfiable by sebastian/diff[3.0.0].
- codeception/phpunit-wrapper 7.0.0 requires sebastian/diff ^3.0 -> satisfiable by sebastian/diff[3.0.0].
- codeception/phpunit-wrapper 7.0.1 requires sebastian/diff ^3.0 -> satisfiable by sebastian/diff[3.0.0].
- codeception/phpunit-wrapper 7.0.2 requires sebastian/diff ^3.0 -> satisfiable by sebastian/diff[3.0.0].
我在出现上述错误之前收到 php-mbstring 的缺少扩展错误,因此 运行 此命令现在我收到上述错误。作曲家创建了不完整的项目,但在浏览器中没有显示错误
sudo apt-get install php-mbstring
好像缺少 phpunit 所以我 运行
sudo apt-get install phpunit
它解决了问题
我正在尝试使用 composer 创建一个 yii2 项目并收到此错误
我正在使用 ubuntu 16.04 LTS
错误: https://pastebin.com/XgSt9Z2B
root@xuf-SATELLITE-C50t-A:/var/www/html/suppare# composer create-project --prefer-dist yiisoft/yii2-app-basic suppare
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Installing yiisoft/yii2-app-basic (2.0.14)
- Installing yiisoft/yii2-app-basic (2.0.14): Loading from cache
Created project in suppare
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- codeception/phpunit-wrapper 6.0.2 requires sebastian/diff ^3.0 -> satisfiable by sebastian/diff[3.0.0].
- codeception/phpunit-wrapper 7.0.0 requires sebastian/diff ^3.0 -> satisfiable by sebastian/diff[3.0.0].
- codeception/phpunit-wrapper 7.0.1 requires sebastian/diff ^3.0 -> satisfiable by sebastian/diff[3.0.0].
- codeception/phpunit-wrapper 7.0.2 requires sebastian/diff ^3.0 -> satisfiable by sebastian/diff[3.0.0].
我在出现上述错误之前收到 php-mbstring 的缺少扩展错误,因此 运行 此命令现在我收到上述错误。作曲家创建了不完整的项目,但在浏览器中没有显示错误 sudo apt-get install php-mbstring
好像缺少 phpunit 所以我 运行
sudo apt-get install phpunit
它解决了问题