您的位置 首页 技术

yii2安装报错怎么办

yii2安装报错怎么办? 在执行 composer安装yii之后 会出现这样的问题 composer create-project –prefer-dist yiisoft/yi…

yii2安装报错怎么办?

在执行 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

推荐学习:Yii入门教程

以上就是yii2安装报错怎么办的详细内容,更多请关注24课堂在线网其它相关文章!

本文来自网络,不代表24小时课堂在线立场,转载请注明出处:https://www.24ketang.cn/33142.html

为您推荐

返回顶部