";您的需求无法解析为一组可安装的软件包“;安装laravel 5简单博客时


"Your requirements could not be resolved to an installable set of packages" when installing laravel 5 simple-blog

当我键入"composer create project laravel/laravel simple blog"从服务器加载简单博客时,我收到一个错误:

Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework v5.2.6 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.5 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.4 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.3 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.2 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- Installation request for laravel/framework 5.2.* -> satisfiable by laravel/framework[v5.2.0, v5.2.1, v5.2.2, v5.2.3, v5.2.4, v5.2.5, v5.2.6].

有人能告诉我出了什么问题吗?

错误告诉您需要知道的一切。

您只是缺少一个必需的PHP扩展Mbstring

您需要安装该软件包,或者通过php.ini文件启用它。

php.ini

找到这一行;extension=php_mbstring.dll,并通过删除;来取消注释,使其读取extension=php_mbstring.dll

或者,如果您的系统允许,只需运行php5enmod mbstring即可

安装它

在基于linux/debian的系统中,它只是apt-get install libapache2-mod-php5。该包包括扩展以及Laravel所需的其他一切。考虑到您在安装时没有其他错误,您可能已经有了这个错误,只需要在php.ini文件

中启用它