Composer telling me mbstring is missing on my server, but it is installed enabled - ideas?

1.3k Views Asked by At

I have laravel 5.3 site running on digitalocean with Ubunto 14.

I get this error when running composer to install a package:

"the requested PHP extension mbstring is missing from your system."

The thing is, it is already enabled, as confirmed by phpinfo:

mbstring
Multibyte Support   enabled
Multibyte string engine libmbfl
HTTP input encoding translation disabled
libmbfl version 1.3.2
oniguruma version   5.9.6

Since I have php7.0 running, for kicks I tried

sudo apt-get install php7.0-mbstring

But it tells me

php7.0-mbstring is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

Really at a loss here. Ideas? Maybe I need to reinstall PHP? Where is composer looking to see if the extension is installed? Why would it n0t be seeing same info that phpinfo returns?

Thanks, Brian

1

There are 1 best solutions below

0
On BEST ANSWER

Basically, you need to install php-mbstring in your server.

sudo apt-get install php-mbstring 

You need to install the specific php version using :

sudo apt-get install phpx.x-mbstring

Hope this works!!