Problem 1
- yiisoft/yii2 2.0.15.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- yiisoft/yii2 2.0.15 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- yiisoft/yii2 2.0.14.2 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- yiisoft/yii2 2.0.14.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- yiisoft/yii2 2.0.14 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
你的mbstring扩展没有打开
查看一下你的php.ini文件(在你的php安装目录下),如果你是在linux系统,查找;
;extension=php_mbstring.dll
如果在linux系统下,去除前面的分号,改为extension=php_mbstring.so。
如果在widows系统下,直接去除前面的分号即可。
注意查找一下,你的php目录下的ext子目录下有无php_mbstring.dll文件。
在执行 composer安装yii之后 回出现这样的问题
composer create-project --prefer-dist yiisoft/yii2-app-basic basic
phpunit/phpunit 6.4.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
phpunit/phpunit 6.4.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
phpunit/phpunit 6.4.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
phpunit/phpunit 6.4.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
或者
这是由于直接安装php7没有安装完整配置出现的问题 执行
首先,你需要安装的扩展模块是:mbstring
安装laravel将依赖该扩展,如果你没有安装该扩展,那么通过composer安装laravel框架,你将无法正常生成laravel框架所依赖的vendor目录。vendor目录以及其下文件是laravel框架正常运行所需的。
第二个要安装的扩展模块是:xml扩展
通过composer安装laravel框架过程中将需要调用ext-dom,若xml扩展未安装,这也会影响我们安装laravel。
以上两个扩展是PHP7版本安装laravel所依赖也是容易被忽略的扩展,当你安装laravel无法正常生成vendor目录时就需要检查mbstring扩展加载情况了。
安装也是简单的:
apt-get install php7.0-mbstring
若提示:phpunit/phpunit 5.0.x requires ext-dom * -> the requested PHP extension dom is missing from your system.
则需要安装xml扩展。
apt-get install php7.0-xml