這篇文章主要介紹yii2安裝報(bào)錯(cuò)的解決方法,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!
yii2安裝報(bào)錯(cuò)怎么辦?
在執(zhí)行 composer安裝yii之后 會出現(xiàn)這樣的問題
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沒有安裝完整配置出現(xiàn)的問題 執(zhí)行
首先,你需要安裝的擴(kuò)展模塊是:mbstring
安裝laravel將依賴該擴(kuò)展,如果你沒有安裝該擴(kuò)展,那么通過composer安裝laravel框架,你將無法正常生成laravel框架所依賴的vendor目錄。vendor目錄以及其下文件是laravel框架正常運(yùn)行所需的。
第二個(gè)要安裝的擴(kuò)展模塊是:xml擴(kuò)展
通過composer安裝laravel框架過程中將需要調(diào)用ext-dom,若xml擴(kuò)展未安裝,這也會影響我們安裝laravel。
以上兩個(gè)擴(kuò)展是PHP7版本安裝laravel所依賴也是容易被忽略的擴(kuò)展,當(dāng)你安裝laravel無法正常生成vendor目錄時(shí)就需要檢查mbstring擴(kuò)展加載情況了。
安裝也是簡單的:
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擴(kuò)展。
apt-get install php7.0-xml
以上是“yii2安裝報(bào)錯(cuò)的解決方法”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!