Home  >  Article  >  PHP Framework  >  What to do if yii2 installation error occurs

What to do if yii2 installation error occurs

藏色散人
藏色散人Original
2020-01-14 11:48:072397browse

What to do if yii2 installation error occurs

What should I do if an error occurs during the yii2 installation?

Such a problem will occur after executing composer to install 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.

or

This is due to the direct installation of php7 without installing the complete configuration execution

First of all, the extension module you need to install is: mbstring

Installing laravel will depend on this extension. If you do not install this extension, then install the laravel framework through composer, you will not be able to generate the laravel framework normally. Dependent vendor directory. The vendor directory and the files under it are required for the normal operation of the laravel framework.

The second extension module to be installed is: xml extension

During the installation of laravel framework through composer, you will need to call ext-dom. If the xml extension is not installed, this will also affect our installation. laravel.

The above two extensions are dependent on the PHP7 version when installing laravel and are easily ignored. When you install laravel and the vendor directory cannot be generated normally, you need to check the loading of the mbstring extension.

Installation is also simple:

apt-get install php7.0-mbstring

If prompted: phpunit/phpunit 5.0.x requires ext-dom * -> the requested PHP extension dom is missing from your system.

You need to install the xml extension.

apt-get install php7.0-xml

Recommended learning: Yii introductory tutorial

The above is the detailed content of What to do if yii2 installation error occurs. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn