安装Laravel时出现Composer错误:'mbstring'缺少? [英] Composer error while installing Laravel: 'mbstring' is missing?

查看:6106
本文介绍了安装Laravel时出现Composer错误:'mbstring'缺少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我决定试用Laravel,因为与OOP PHP相比,我已经开始使用和安装了。



不管我试图在我的cmd(。〜/ wamp / www /)执行'composer create-project laravel / laravel --prefer-dist'命令,它创建了Laravel文件夹,但是给我这个输出:

  *安装laravel / laravel(v5.1.4)
- 安装laravel / laravel(v5.1.4)
来自缓存

在C:\wamp\www\laravel中创建的项目
> php -rcopy('。env.example','.env');
加载包信息的composer存储库
安装依赖包(包括require-dev)
您的需求无法解析为一组可安装的包。

问题1
- laravel / framework v5.1.8需要ext-mbstring * - >所请求的PHP exte
nsion mbstring从您的系统中丢失。
- laravel / framework v5.1.7需要ext-mbstring * - >所请求的PHP exte
nsion mbstring从您的系统中丢失。
- laravel / framework v5.1.6需要ext-mbstring * - >所请求的PHP exte
nsion mbstring从您的系统中丢失。
- laravel / framework v5.1.5需要ext-mbstring * - >所请求的PHP exte
nsion mbstring从您的系统中丢失。
- laravel / framework v5.1.4需要ext-mbstring * - >所请求的PHP exte
nsion mbstring从您的系统中丢失。
- laravel / framework v5.1.3需要ext-mbstring * - >所请求的PHP exte
nsion mbstring从您的系统中丢失。
- laravel / framework v5.1.2需要ext-mbstring * - >所请求的PHP exte
nsion mbstring从您的系统中丢失。
- laravel / framework v5.1.1需要ext-mbstring * - >所请求的PHP exte
nsion mbstring从您的系统中丢失。
- laravel / framework v5.1.0需要ext-mbstring * - >所请求的PHP exte
nsion mbstring从您的系统中丢失。
- laravel / framework的安装请求5.1。* - >满足laravel
/framework[v5.1.0,v5.1.1,v5.1.2,v5.1.3,v5.1.4,v5.1.5,v5.1.6,v5.1.7,v5.1。
8]。
C:\wamp \www> *

p>

我试过安装一个新的作曲家,我已经尝试复制一个laravel目录,并手动将它放在我的/ www。



我已经确保WAMP正在使用所有的模块和扩展根据我所读的。



我编辑了php.ini文件,并采取了半



现在经过一番Google搜索之后,我迷失了。





是我的PHP.ini文件



所以我不能粘贴整个东西,但看看这里:



http://jpst.it/AAhW

解决方案

我有同样的问题。


  1. 转到您的php.ini文件。

  2. 找到扩展程序= php_mbstring.dll。 (ctrl + f可能无效,只需在php.ini中找到带有扩展名的长列表)

  3. 取消注释扩展名,通过删除同一行中的分号来实现。

  4. 保存php.ini文件。

这可能不是最后一次遇到类似这样的东西。作为经验法则,仔细阅读错误,并对您的php.ini文件进行适当的更改。



祝你好运!


I've decided to try out Laravel and I've been going on and off with the installation because of how tedious it is in comparison to OOP PHP.

Nontheless I'm trying to execute the 'composer create-project laravel/laravel --prefer-dist' command on my cmd(.~/wamp/www/) and it created the Laravel folder but gives me this output:

*Installing laravel/laravel (v5.1.4)
  - Installing laravel/laravel (v5.1.4)
    Loading from cache

Created project in C:\wamp\www\laravel
> php -r "copy('.env.example', '.env');"
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.1.8 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
    - laravel/framework v5.1.7 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
    - laravel/framework v5.1.6 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
    - laravel/framework v5.1.5 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
    - laravel/framework v5.1.4 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
    - laravel/framework v5.1.3 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
    - laravel/framework v5.1.2 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
    - laravel/framework v5.1.1 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
    - laravel/framework v5.1.0 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
    - Installation request for laravel/framework 5.1.* -> satisfiable by laravel
/framework[v5.1.0, v5.1.1, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.
8].
C:\wamp\www>*

I am using windows.

I have tried installing a fresh composer, I have tried copying a laravel directory and placing it in my /www manually.

I've made sure that WAMP is using all modules and extensions according to what I read.

I've edited the php.ini file and taken of the semi-colons where necessary.

And now after a bit of Google Searching, I am lost.

Could anybody help me with this problem please, I would appreciate it.

Thanks in advance!

Below is my PHP.ini file

So I couldn't paste the whole thing, but take a look at it here:

http://jpst.it/AAhW

解决方案

I had the same problem. Here's the solution.

  1. Go to your php.ini file.
  2. Locate the extension "extension=php_mbstring.dll". (ctrl+f might not work, just locate the long list with extensions in php.ini)
  3. Uncomment the extension, you do this by removing the semicolon in the same line.
  4. Save your php.ini file.

This probably won't be the last time you'll encounter something like this. As a rule of thumb, read the error carefully and make the appropriate change to your php.ini file.

Good luck!

这篇关于安装Laravel时出现Composer错误:'mbstring'缺少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆