Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
553 views
in Technique[技术] by (71.8m points)

frameworks - Composer error while installing Laravel: 'mbstring' is missing?

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:wampwwwlaravel
> 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:wampwww>*

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...