Problems
d11wtq/boris v1.0.10 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
d11wtq/boris v1.0.10 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
Installation request for d11wtq/boris v1.0.10 -> satisfiable by d11wtq/boris[v1.0.10].
When I run command: composer install it creating error.
And also how to install extension on php.init.
extension=php_curl.dll
I know this is an old one, but I ran into the same problem and with this switch just solved it:
composer install --ignore-platform-reqs
I fixed this by running composer update before install.
Solved my problem updating and ignoring requested PHP extensions:
composer update --ignore-platform-reqs
http://php.net/manual/en/pcntl.installation.php
Process Control support in PHP is not enabled by default. You have to
compile the CGI or CLI version of PHP with --enable-pcntl
configuration option when compiling PHP to enable Process Control
support.
Note:
Currently, this module will not function on non-Unix platforms (Windows).
I had the same problem on my system (OpenSUSE, PHP7). Simply installing php7-pcntl solved my problem.
We can resolve this issue by following way.
Your options are as follows:
Install the required extensions (best option)
Run composer with the --ignore-platform-reqs flag (very hacky) like composer update --ignore-platform-reqs
Upgrade to Laravel 5 (we no longer user boris for the tinker command)
Related
I have face this problem to install maatwebsite/excel on laravel 8. How can I fix it?
NB: PHP version running 8.
I solved the problem with
I just enable PHP gd extension from php.ini file
installing PHP package PhpSpreadsheet
The problem is about Laravel Excel requirements. It seems PhpSpreadsheet: ^1.15 is not installed. Here is the list of requirements for Laravel-Excel 3.1,
PHP: ^7.2\|^8.0
Laravel: ^5.8
PhpSpreadsheet: ^1.15
PHP extension php_zip enabled
PHP extension php_xml enabled
PHP extension php_gd2 enabled
PHP extension php_iconv enabled
PHP extension php_simplexml enabled
PHP extension php_xmlreader enabled
PHP extension php_zlib enabled
Make sure these are installed and enabled on your php.ini. Also make sure your php version on composer.json is set like this:
"require": {
"php": "^7.2|^8.0",
},
Instead of something like this "php": ">=7.2". Check this out for more information. Please let me know if it worked.
I just want share another answer related here. If you run on unix (linux), try install php-gd using command line. Try check other answer related to your system.
sudo apt-get update
sudo apt-get install php8.0-gd
related:
How to install PHP GD in Ubuntu
install php-gd ext on Debian
Issue with enabling GD in PHP
If you using windows. Use this command.
composer require maatwebsite/excel --ignore-platform-reqs
This problem happen only on php 8.x! perhaps on lastest php 7. The problem same as above and still failed even php-gd is active. When type
composer require maatwebsite/excel
the error still the same. When checking using
php -i
(basicly same as phpinfo in console). We can see php gd is active. This answer is not recommended at the moment. Fixed still on the way related to this issue.
related link:
https://github.com/Maatwebsite/Laravel-Excel/discussions/3191
PHP8 is supported, make sure to use 3.1.30 of the package as mention above. To see other issue, please read this link.
https://github.com/Maatwebsite/Laravel-Excel/issues/2936
I solved using
Enable zip and gd extension in php.ini
or install using sudo apt-get install php8.0-gd
sudo apt-get install php8.0-zip
use composer require maatwebsite/excel:^3.1 -W
-W is for with-all-dependencies
I have just used composer require maatwebsite/excel -W --ignore-platform-req=ext-zip and this has worked for me on linux ubuntu 20 with php 8.1
delete composer.lock (json)
then run below command
composer require phpoffice/phpspreadsheet
composer require maatwebsite/excel
it is working
I am creating a php website using the symfony framework and composer.
Operating system: Windows 10
PHP version: 7.3.2
Symfony: 4.2.3 (env: dev, debug: true)
Composer: 1.8.4 (2019-02-11)
When I try to do compose update inside the projects folder or when I try to install a bundle using composer require symfony/swiftmailer-bundle I get the following error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested PHP extension ext-http * is missing from your system.
Install or enable PHP's http extension.
(It says 'Problem 1', but it is the only problem listed.)
I already looked for the extension in my php.ini file, but I can't find it. Do I need to install an extension manually? If so, where can I find it?
Thanks in advance!
Update:
It might be worth looking at the other answers too. Since I'm no longer working with PHP, I'm not going to set up a project and try to recreate the problem I had just to test the new suggested solutions. If another answer did help you, give it a vote '^' this way I know which answers are helpful.
The solution is found. For some reason my composer.json contained "ext-http": "*".
"require": {
"ext-http": "*"
}
Removing this line fixed the problem. I don't know why it contained "ext-http": "*" and I don't fully understand why removing it would fix the problem. (Is it because it is looking for the extension, but can not find it?)
(Thank you to everyone trying to help me fix the problem!)
in my case i'm using ubuntu, hope this solve the problem.
sudo apt install php-http
php-http is a standard which is implemented by different packages. ext-http is the Composer way to tell that your application requires at least one of those packages. See the section called "Composer virtual packages" at http://docs.php-http.org/en/latest/clients.html for additional details.
Differently than other packages, the ext-... lines do not actually install anything via composer, they just make composer check that you have some required dependency.
Usually you can just install the corresponding PHP library, e.g. ext-zip means that you need to install php-zip. In this case, there is no single PHP library but a series of compatible libraries.
You should be able to fix your issue by installing one of the provided packages, e.g.
composer require php-http/curl-client
For those who encountered with this problem:
- The requested PHP extension ext-http * is missing from your system.
The solution is just to install PHP extension:
sudo apt install php-pecl-http
In case someone needs it, one can also install it with pecl
(it needs extensions raphf and propro loaded to build):
yum install libcurl-devel brotli-devel
pecl install pecl_http
...
Build process completed successfully
Installing '/usr/lib64/php/modules/http.so'
Installing '/usr/include/php/ext/http/php_http.h'
Installing '/usr/include/php/ext/http/php_http_api.h'
Installing '/usr/include/php/ext/http/php_http_buffer.h'
Installing '/usr/include/php/ext/http/php_http_client.h'
Installing '/usr/include/php/ext/http/php_http_client_curl.h'
Installing '/usr/include/php/ext/http/php_http_client_curl_event.h'
Installing '/usr/include/php/ext/http/php_http_client_curl_user.h'
Installing '/usr/include/php/ext/http/php_http_client_request.h'
Installing '/usr/include/php/ext/http/php_http_client_response.h'
Installing '/usr/include/php/ext/http/php_http_cookie.h'
Installing '/usr/include/php/ext/http/php_http_curl.h'
Installing '/usr/include/php/ext/http/php_http_encoding.h'
Installing '/usr/include/php/ext/http/php_http_encoding_brotli.h'
Installing '/usr/include/php/ext/http/php_http_encoding_zlib.h'
Installing '/usr/include/php/ext/http/php_http_env.h'
Installing '/usr/include/php/ext/http/php_http_env_request.h'
Installing '/usr/include/php/ext/http/php_http_env_response.h'
Installing '/usr/include/php/ext/http/php_http_etag.h'
Installing '/usr/include/php/ext/http/php_http_exception.h'
Installing '/usr/include/php/ext/http/php_http_filter.h'
Installing '/usr/include/php/ext/http/php_http_header.h'
Installing '/usr/include/php/ext/http/php_http_header_parser.h'
Installing '/usr/include/php/ext/http/php_http_info.h'
Installing '/usr/include/php/ext/http/php_http_message.h'
Installing '/usr/include/php/ext/http/php_http_message_body.h'
Installing '/usr/include/php/ext/http/php_http_message_parser.h'
Installing '/usr/include/php/ext/http/php_http_misc.h'
Installing '/usr/include/php/ext/http/php_http_negotiate.h'
Installing '/usr/include/php/ext/http/php_http_object.h'
Installing '/usr/include/php/ext/http/php_http_options.h'
Installing '/usr/include/php/ext/http/php_http_params.h'
Installing '/usr/include/php/ext/http/php_http_querystring.h'
Installing '/usr/include/php/ext/http/php_http_response_codes.h'
Installing '/usr/include/php/ext/http/php_http_url.h'
Installing '/usr/include/php/ext/http/php_http_utf8.h'
Installing '/usr/include/php/ext/http/php_http_version.h'
install ok: channel://pecl.php.net/pecl_http-3.2.3
configuration option "php_ini" is not set to php.ini location
You should add "extension=http.so" to php.ini
I had the same problem too.
My problem was that when I use RuntimeException class, I made a mistake by import use http\Exception\RuntimeException; instead of the standard one use RuntimeException. And the class http\Exception\RuntimeException; required ext-http extension.
So my suggestion is that, you should search your all project and check whether you made the same mistake as mine or not. You can search all by keyword use http\.
Btw I don't think install or unstall ext-http plugin will solve the problem.
According to PHP Official Documentation, You'll have to find your extension in php.ini and uncomment it OR add it in general. It's probably something like extension=php_http.dll.
Have you already tried the options here for similar issues?
Composer: The requested PHP extension ext-intl * is missing from your system
I have not experienced this issue on WAMP stacks yet... but it looks like some related articles (where this particular item 'ext-http' is not the issue) could be helpful.
When I've had similar issues on LAMP stacks, it usually meant that I did need to install the item mentioned... though sometimes Composer was a bit misleading as to the actual item needed.
Example #1 (LAMP)... actual item described was needed:
composer require phpoffice/phpspreadsheet
Error produced: missing php-mstring
Solution:
yum install php-mbstring
Example #2 (LAMP)... something slightly different than the item described was needed:
composer require phpoffice/phpspreadsheet
Error produced: missing ext-zip
Solution:
yum install php-pecl-zip
Also, perhaps running composer in verbose mode?
But, I think your best bet to start is the first link provided in this answer (and then looking through similar WAMP Composer missing item issues).
Had the same problem in composer.json file. Also discovered, that I have an "ext-http": "*". To solve this problem just delete the "ext-http": "*" and try to install package again. Worked for me, hope for you too :)
In my case, the combination worked (Ubuntu php7.4)
sudo apt install php-pear
pecl install pecl_http
I try to install the sandbox but I get the following error from composer:
Loading composer repositories with package information Installing
dependencies from lock file Your requirements could not be resolved to
an installable set of packages.
Problem 1
- Installation request for sonata-project/intl-bundle 2.1.0 -> satisfiable by sonata-project/intl-bundle 2.1.0.`
- sonata-project/intl-bundle 2.1.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.`
Problem 2
- sonata-project/intl-bundle 2.1.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.`
- sonata-project/news-bundle 2.1.x-dev requires sonata-project/intl-bundle 2.1.* -> satisfiable by sonata-project/intl-bundle 2.1.0.
- Installation request for sonata-project/news-bundle 2.1.
I had the same problem while I was installing new Magento 2.0, after different hit and trials, I manged to solve it by following these steps:
I copied all icu* files from php directory to Appache directory, and it worked.
Php direcotry:
WAMP\bin\php\php5.5.12
Appache Directory:
WAMP\bin\apache\apache2.4.9
Make sure to un-comment following line in php.ini file:
extension=ext/php_intl.dll
Linux user
yum install php-intl
Like #Hugehornet pointed out - you should enable this extension in php.ini by uncommenting this line: extension=ext/php_intl.dll
If you use wamp's interface for this task you are actually updating the php.ini file located in apache's directory.
Example: C:\wamp\bin\apache\Apache2.4.4\bin\php.ini
Composer is using the one located in the php's installation directory.
Example: C:\wamp\bin\php\php5.4.12\php.ini
You should manually edit the latter and restart the wamp server.
You need to enable the intl extension in php just as the error says.
In your php.ini file, uncomment the line extension=ext/php_intl.dll or something like this.
Edit : note that if you are using wamp or something like this, you should be aware of the fact that the php.ini file in the wamp config is not necessarily the one used by composer.
First of all be sure that your server is isung x86 build (intl not working with x64), then:
activate intl extension in php.ini directly
copy all icu*.dll form php directory to apache directory
make sure your console using the same php folder you just configured
source.
In my windows system I have two php.ini files at the flowing paths:
C:\wamp\bin\php\phpx.y.z
C:\wamp\bin\apache\Apachex.y.z\bin
I don't know which one is in your path. Just make sure to add the extension in both of them to eliminate any doubt.
I am on a Mac OS X Yosemite, and I fix this error
the requested PHP extension mcrypt is missing from your system
by running the following commands :
brew update
brew upgrade
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew install php54-mcrypt
If intl has already been enabled and it doesn't works, add your PHP directory in the Path environment variable, then restart your server.
(for example C:\Program Files\wamp\bin\php\phpX.XXX.XXX for wamp)
It has worked for me!
On Ubuntu, Debian, and related Linux distributions
sudo apt-get install php-intl
to install the extension for the default PHP version.
For other versions a variation like apt-get install php7.3-intl will choose the correct extension if the version provided is correct.
I have been trying to get Sylius installed on my Bluehost server which is running on shared hosting and while I do have SSH access, it is somewhat limited. It did not come with the php intl extension and the version of ICU on it is 4.2 which produces errors when installing Sylius because it wants a newer version.
I tried this on a clean install of Sylius on my Bluehost server and got it to work.
I had previously installed the intl extension on my BlueHost server following https://my.bluehost.com/cgi/help/534
The intl extension is not required. See below. (I was attempting to install it before I realized I didn't need it)
After installing the extension, phpinfo() said the version of ICU was 4.2.
Note: on BlueHost you have to use php-cli instead of php to run php scripts from the command line
To install Sylius I ran:
wget http://getcomposer.org/composer.phar
php-cli composer.phar create-project sylius/sylius -s dev
When running create-project, I recieved the error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for symfony/icu 1.2.x-dev -> satisfiable by symfony/icu[1.2.x-dev].
- symfony/icu 1.2.x-dev requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
Problem 2
- symfony/icu 1.2.x-dev requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
- symfony/intl 2.3.x-dev requires symfony/icu >=1.0-RC,<2.0 -> satisfiable by symfony/icu[1.2.x-dev].
- Installation request for symfony/intl 2.3.x-dev -> satisfiable by symfony/intl[2.3.x-dev].
I then used cd sylius to move into the new directory made from the partial project install.
From the section on http://symfony.com/doc/current/components/intl.html about ICU and deployment problems I added "symfony/icu": "1.1.*", (or add "symfony/icu": "1.0.*", if you do not have the intl extension installed) to the require section of composer.json
I then ran php-cli composer.phar update to get all the dependencies which takes a while (make sure you reference composer.phar correctly as it was downloaded into the parent directory)
After all the packages were downloaded, it asked for config parameters such as Database info
Then I ran php-cli app/console sylius:install
I ran php-cli app/console doctrine:fixtures:load and recieved the error:
[RuntimeException]
The country resource bundle could not be loaded for locale "en"
From info at https://github.com/symfony/symfony/issues/5279#issuecomment-12477297 and https://github.com/kbsali/sf2-icu I ran
wget https://github.com/kbsali/sf2-icu/tarball/master -O sf2-icu.tgz
tar xzvf sf2-icu.tgz
mv kbsali-sf2-icu-XXXX/4.2 vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/data/
rm -rf kbsali-sf2-icu-XXXX sf2-icu.tgz
and then edited vendor/symfony/symfony/src/Symfony/Component/Locale/Locale.php and changed
const ICU_DATA_VERSION = '49';
to
const ICU_DATA_VERSION = '4.2';
I ran php-cli app/console doctrine:fixtures:load again and loaded all of the Data Fixures until LoadOrdersData failed with the error:
[ErrorException]
Warning: array_keys() expects parameter 1 to be array, object given in /home5/ozzieorc/public_html/sylius_clean/sylius/vendor/fzaninotto/faker/src/Faker/Provider/Base.php line 127
Then made the changes described at https://github.com/Sylius/Sylius/pull/216/files - hopefully this becomes part of the master branch and doesn't have to be changed when installing sylius
and ran php-cli app/console doctrine:fixtures:load a third time
I added my IP to the array of valid IP addresses in web/app_dev.php so I can run app_dev.php remotely from the BlueHost servers
In your browser you can go to web/app_dev.php and login to the admin area with
Username: sylius#example.com
Password: sylius
as the page suggests
Hopefully this helps anyone having problems with installing Sylius. It took me a while to figure it out. Let me know if there are any better ways of going about this.
Try this:
apt-get install php5-intl
I've had no problems installing Symfony 2.2.x using Composer, I've always just copied the stable version at http://symfony.com/download.
composer create-project symfony/framework-standard-edition myproject/ 2.2.1
(I have Composer installed globally)
Curious about 2.3.0-RC1 I figured this would go smoothly:
composer create-project symfony/framework-standard-edition mynewerproject/ 2.3.0-RC1
But got shutdown by the following errors:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- symfony/icu v1.2.0-RC1 requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
- symfony/icu v1.1.0-RC1 requires lib-icu >=3.8 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
- symfony/symfony v2.3.0-RC1 requires symfony/icu >=1.0,<2.0 -> satisfiable by symfony/icu[v1.1.0-RC1, v1.2.0-RC1].
- Installation request for symfony/symfony 2.3.* -> satisfiable by symfony/symfony[v2.3.0-RC1].
Do I need to tweak the composer.json file?
Solution Update
I was missing the php intl extension which provides lib-icu
So easy, install and configure the intl extension. As of PHP 5.3 the Intl extension is distributed by default, but some distributions, like MAMP, don't have Intl so you'll need to acquire it. I used PEAR:
My steps:
Install the Intl extension (maintained by PECL): $ pear install pecl/intl — you may have to add the pecl channel to pear first.
If you use MAMP and have never worked with pear/pecl check lullabot's helpful blog post; MAMP doesn't ship with the php source, so you have to download the source for your php version and move the source into /Applications/MAMP/bin/php/php[version]/include/php (as covered in the blog post)
PEAR couldn't find my php.ini, so I had to manually add extension=intl.so to php.ini. In MAMP you can edit php.ini easily by going to File > Edit Template > php.[version].ini
Command Line:
When using Composer or Symfony's Console CLI you'll also need Intl and since the php CLI usually uses a different php.ini you'll want to add the extension directive there too. To find your CLI's php.ini simply do $ php -i |grep php\.ini to discover the file path and add extension=intl.so to that php.ini as well.
To check if Intl is installed you can do $ php -m to check available modules.
update your php-intl extension, that's where the icu error comes from!
sudo aptitude install php5-intl // i.e. ubuntu
brew install icu4c // osx
check the extension is enabled and properly configured in php.ini aswell.
( hint: php-cli sometimes uses a different php.ini )
php.ini
extension=intl.so ; *nix
extension=php_intl.dll ; windows
[intl]
intl.default_locale = en_utf8
intl.error_level = E_WARNING
check your phpinfo() AND php -m from your terminal if the extension has been succesfully enabled.
Check your current intl versions from php with:
Intl::getIcuVersion();
Intl::getIcuDataVersion();
attention: not needed anymore ( symfony 2.3 has meanwhile been released )
add the minimum stability flag #dev or #rc to your dependency like this please:
composer create-project symfony/framework-standard-edition mynewerproject/ 2.3.*#dev
The default stability in composer is stable which symfony 2.3 branch is not currently ( it's #rc ). Read more an stability flags here.
Many applications will only be supporting "en" locale and will have no need for translation capabilities or php-intl. If this is you, or you can't install php-intl on your server, you can explicitly add symfony/icu ~1.0 to your composer.json. 1.0 does not require php-intl, whereas 1.1+ does.
If you don't need translation features:
$ php bin/composer.phar require symfony/icu ~1.0
Without this declaration and trying to install symfony/symfony 2.3 Composer may try to install symfony/icu ~1.2 which would require you to install php-intl.
This is explicitly covered more extensively in the Symfony Intl Component's docs under "ICU and Deployment Problems".
A solution regarding this or similar problems can be found here: ICU and Deployment Problems
The behavior of composer should be intelligent selecting the right icu-component:
symfony/icu 1.0.*: when the intl extension is not available
symfony/icu 1.1.*: when intl is compiled with ICU 4.0 or higher
symfony/icu 1.2.*: when intl is compiled with ICU 4.4 or higher
There should be (theoretically) no error installing symfony 2.3. with no intl-extension.
But you can be trapped when your development-environment differs from your production-server like mentioned in this article:
the development machines are compiled with ICU 4.4 or higher, but the server is compiled >with a lower ICU version than 4.4
the intl extension is available on the development machines but not on the server.
When you have no root-access to your production-server you can fix it as mentioned in this article. (tweaking composer.json)
Hope this additional information helped as it helped me for this special case with different environments.
Mac OS Mavericks comes with PHP 5.4.17 without intl. To get this, you'll have to follow those steps :
brew install icu4c
sudo pecl install intl
The path to the ICU libraries and headers is: /usr/local/opt/icu4c/
Edit /etc/php.ini and add extension=intl.so to the end.
I know that this answer may not be the correct answer to this person's problem, but it was the solution to my problem with the same title. I was able to fix this problem for myself by enabling the intl extension in php.ini and upgrading composer.
Upgrading composer.
php composer.phar self-update
Remove comment from this line (in php.ini):
extension=php_intl.dll
And also remove comment the these two lines below [intl] in (php.ini):
[intl]
intl.default_locale = en_utf8
intl.error_level = E_WARNING
And restart apache2 of course. :)
Additional Information:
If your using mac and installed php with Homebrew follow these steps:
(PHP 5.4)
$ brew install php54-intl
(PHP 5.5)
$ brew tap josegonzalez/php
$ brew tap homebrew/dupes
$ brew install josegonzalez/php/php55-intl
$ sudo apachectl restart
Restart apache.
A better solution is to fix your composer.json to the version required by the production server. First, determine the ICU version on the server:
1
2
$ php -i | grep ICU
ICU version => 4.2.1
Then fix the Icu component in your composer.json file to a matching version:
"require: {
"symfony/icu": "1.1.*"
}
Set the version to
"1.0." if the server does not have the intl extension installed;
"1.1." if the server is compiled with ICU 4.2 or lower.
Finally, run
php composer.phar update symfony/icu
on your development machine, test extensively and deploy again. The installation of the dependencies will now succeed.