my error message that I am getting from the composer is:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for laravel/framework v5.4.28 -> satisfiable by laravel/framework[v5.4.28].
- laravel/framework v5.4.28 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 2
- Installation request for phpunit/phpunit 5.7.21 -> satisfiable by phpunit/phpunit[5.7.21].
- phpunit/phpunit 5.7.21 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 3
- laravel/framework v5.4.28 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/tinker v1.0.1 requires illuminate/console ~5.1 -> satisfiable by laravel/framework[v5.4.28].
- Installation request for laravel/tinker v1.0.1 -> satisfiable by laravel/tinker[v1.0.1].
I have tried uncommenting the extension=php_mbstring.dll but it still raises the error. I have tried to change the extension_dir in the "php.ini" and it gives an error. Help is appreciated.
-- EDIT BASED ON NEW INFORMATION --
Since this is Windows, re-installing PHP, enabling the extension in the PHP.INI file, and restarting the Webserver, should work.
-- PREVIOUS SOLUTION FOR LINUX --
You need to install mbstring for php.
Use:
sudo apt-get install phpX.X-mbstring
Where X.X is your version number of PHP.
Its worked for me:
sudo apt-get install php7.2-mbstring
It works
sudo apt-get install php7.3-mbstring
sudo apt install php-xml
composer update
Related
OS: Ubuntu 17.10 (Artful Aardvark)
I have installed the LAMP stack and Laravel, and when I tried composer install in my Laravel application, I got the following errors.
- Installation request for phar-io/manifest 1.0.1 -> satisfiable by phar-io/manifest[1.0.1].
- phar-io/manifest 1.0.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 2
- Installation request for phpunit/php-code-coverage 5.2.2 -> satisfiable by phpunit/php-code-coverage[5.2.2].
- phpunit/php-code-coverage 5.2.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 3
- Installation request for phpunit/phpunit 6.4.3 -> satisfiable by phpunit/phpunit[6.4.3].
- phpunit/phpunit 6.4.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 4
- Installation request for theseer/tokenizer 1.1.0 -> satisfiable by theseer/tokenizer[1.1.0].
- theseer/tokenizer 1.1.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.1/cli/php.ini
- /etc/php/7.1/cli/conf.d/10-opcache.ini
- /etc/php/7.1/cli/conf.d/10-pdo.ini
- /etc/php/7.1/cli/conf.d/20-calendar.ini
- /etc/php/7.1/cli/conf.d/20-ctype.ini
- /etc/php/7.1/cli/conf.d/20-exif.ini
- /etc/php/7.1/cli/conf.d/20-fileinfo.ini
- /etc/php/7.1/cli/conf.d/20-ftp.ini
- /etc/php/7.1/cli/conf.d/20-gettext.ini
- /etc/php/7.1/cli/conf.d/20-iconv.ini
- /etc/php/7.1/cli/conf.d/20-json.ini
- /etc/php/7.1/cli/conf.d/20-mbstring.ini
- /etc/php/7.1/cli/conf.d/20-pdo.ini
- /etc/php/7.1/cli/conf.d/20-phar.ini
- /etc/php/7.1/cli/conf.d/20-posix.ini
- /etc/php/7.1/cli/conf.d/20-readline.ini
- /etc/php/7.1/cli/conf.d/20-shmop.ini
- /etc/php/7.1/cli/conf.d/20-sockets.ini
- /etc/php/7.1/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.1/cli/conf.d/20-sysvsem.ini
- /etc/php/7.1/cli/conf.d/20-sysvshm.ini
- /etc/php/7.1/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
I have rechecked the files, all extensions are enabled and they are located in the
/usr/lib/php/20160303 folder.
Sometimes the problem is the php-xml extension.
Try:
sudo apt-get install php-xml
If still facing the issue then try
sudo apt-get install -y php7.1 php7.1-xml php7.1-mysql php7.1-curl php7.1-mbstring
Try following command:
sudo apt-get install php-mbstring
sudo apt-get install php-xml
As the log speaks we need to install the extension "dom". This is how we do it:
sudo apt install php7.1-dom
If the log shows only one extension missing, then the above command works. If there are other extensions missing, you can add those extensions in the same line like shown below:
sudo apt install php7.1-dom php7.1-ext-mbstring
That’s it. Now you won’t have any issues in installing PHP Composer. Enter composer install.
When I type "composer create-project laravel/laravel simple-blog" to load simple-blog from the server, I receive an error:
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].
Can anyone tell me what is going wrong?
The error tells you everything you need to know.
You are simply missing a required PHP extension, Mbstring.
You either need to install the package or enable it through your php.ini file.
php.ini
Find this line ;extension=php_mbstring.dll and uncomment it by removing the ; so it reads extension=php_mbstring.dll
Or just run php5enmod mbstring if your system allows it
Install it
In a linux/debian based system it would just be apt-get install libapache2-mod-php5. The package includes the extension as well as everything else you need for Laravel. Considering you have no other errors on install, you likely already have this and just need to enable it in your php.ini file
I am trying to get started with laravel on windows and here is the command I tried:
rahul#rahulserver MINGW64 /d/PhpIdeaProjects/LaravelLearning
$ composer create-project laravel/laravel learning-laravel-5
Here is the output I get:
Installing laravel/laravel (v5.0.22)
- Installing laravel/laravel (v5.0.22)
Loading from cache
Created project in learning-laravel-5
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for danielstjules/stringy 1.9.0 -> satisfiable by danielstjules/stringy[1.9.0].
- danielstjules/stringy 1.9.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 2
- Installation request for laravel/framework v5.0.16 -> satisfiable by laravel/framework[v5.0.16].
- laravel/framework v5.0.16 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
So how shall I move on and have it working?
The requested dependencies require the php extension mbstring as the error explains.
the requested PHP extension mbstring is missing from your system
So install the extension and it should install flawless.
mbstring is built in the libapache2-mod-php5 package. Run
sudo apt-get install libapache2-mod-php5
For windows environments check your php.ini and uncomment the line ;extension=php_mbstring.dll to extension=php_mbstring.dll - then restart your webserver.
I installed Composer for windows file.exe and tried to install cakePHP 3.1.1 just now for the first time, but got the below error. Files[CakePHP311] created in that folder and also have XAMPP[PHP version 5.6.8] + Windows 10 Pro.
What is this error and cakePHP files needed re-setup?
User#cccc/C/xampp/htdocs/cakePHP_Blog
$ composer create-project --prefer-dist cakephp/app cakePHPblog
Installing cakephp/app (3.1.1)
- Installing cakephp/app (3.1.1)
Downloading: 100%
Created project in cakePHPblog
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem
- cakephp/cakephp 3.1.x-dev requires ext-intl * -> the requested PHP extensi on intl is missing from your system.
- cakephp/cakephp 3.1.0-beta2 requires ext-intl * -> the requested PHP exten sion intl is missing from your system.
- cakephp/cakephp 3.1.0-beta requires ext-intl * -> the requested PHP extens ion intl is missing from your system.
- cakephp/cakephp 3.1.0-RC1 requires ext-intl * -> the requested PHP extensi on intl is missing from your system.
- cakephp/cakephp 3.1.0 requires ext-intl * -> the requested PHP extension i ntl is missing from your system.
- Installation request for cakephp/cakephp ~3.1 -> satisfiable by cakephp/ca kephp[3.1.0, 3.1.0-RC1, 3.1.0-beta, 3.1.0-beta2, 3.1.x-dev].
This error occurred from php-intl plugin missing.
If you use Linux, you can try apt-get install php5-intl or yum install php-intl command.
Make sure the extension php_intl is installed and enabled. It comes bundled with the XAMPP installation but may not be enabled. You can enable it by checking for the following line in your php.ini (located at /xampp/php/php.ini) which may be commented out and removing the comment:
;extension=php_intl.dll
TO (remove the semicolon)
extension=php_intl.dll
You will then need to restart Apache from the Xampp Control Panel.
I want to use
https://github.com/rappasoft/laravel-5-boilerplate as a starting point for my Laravel project, but when I do composer install i get the following errors.
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for guzzle/guzzle v3.9.3 -> satisfiable by guzzle/guzzle[v3.9.3].
- guzzle/guzzle v3.9.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.
Problem 2
- Installation request for stripe/stripe-php v1.18.0 -> satisfiable by stripe/stripe-php[v1.18.0].
- stripe/stripe-php v1.18.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
Problem 3
- guzzle/guzzle v3.9.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- league/oauth1-client 1.5.0 requires guzzle/guzzle 3.* -> satisfiable by guzzle/guzzle[v3.9.3].
- Installation request for league/oauth1-client 1.5.0 -> satisfiable by league/oauth1-client[1.5.0].
How to resolve this?
you are missing php5-curl - CURL module for php5
sudo apt-get install php5-curl
and try to install again.
if you are using ubuntu 16.04, by default it comes with php 7. you are missing php-curl - CURL module for php7
sudo apt install php-curl