目前我正在关注basic Laravel tutorial。 我克隆了文件夹并运行了composer install。这会导致以下错误:http://pastebin.com/FijE9SN5。
这就是composer.json的样子:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"symfony/css-selector": "2.8.*|3.0.*",
"symfony/dom-crawler": "2.8.*|3.0.*"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
所以我在google上搜索了错误。我在stackoverflow上找到answer说我需要删除我的php ini文件中ext-mbstring前面的分号。但它仍然无法正常工作。我现在很无能为力。有谁知道答案?
答案 0 :(得分:0)
由于我的声誉,我无法发表评论,但您要做的第一件事就是遵循错误中的说明。这样,你应该检查你的php.ini中是否启用了ext-mbstring和ext-dom。你说你在ext-mbstring前删除了分号,但是你也为dom扩展做了这样的分号吗?
另外,验证php-xml的安装如图所示here:
sudo apt-get install php-xml
答案 1 :(得分:0)
好的我修好了,结果我不得不跑
sudo apt-get install php-xml
就像ThePurpleK说的那样。
我不得不跑
apt-get install php-mbstring.
非常感谢!