I am being asked to install PHP extension. I've used brew install php#7.3 it updated but has not satisfied the requirements. What do i need to do to satisfy the requirements?
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for laravel/installer ^2.2 -> satisfiable by laravel/installer[v2.2.0].
- laravel/installer v2.2.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
I've tried the suggestions in this post and it did not work for me.
I found this solution here.
"I solved this problem by first creating a new dir sbin in the local dir:
sudo mkdir sbin
then if you are like me using macOS highSierra 10+ you need to run:
sudo chown -R $(whoami) $(brew --prefix)
after this
brew link php
"
Related
I'm trying to create laravel project in WSL2 ubuntu. I have the projects folder (www) in the WSL root directory, inside that folder i have laravel_test subfolder. When i run
composer create-project laravel/laravel example-app
but i'm getting an error
Your requirements could not be resolved to an installable set of packages.
How can i slove this issue?
root#LAPTOP-R27NIA9B:~/www/laravel_test# composer create-project laravel/laravel example-app
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? Y
Creating a "laravel/laravel" project at "./example-app"
Installing laravel/laravel (v9.3.5)
- Installing laravel/laravel (v9.3.5): Extracting archive
Created project in /root/www/laravel_test/example-app
> #php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires laravel/pint ^1.0 -> satisfiable by laravel/pint[v1.0.0, v1.1.0, v1.1.1].
- laravel/pint[v1.0.0, ..., v1.1.1] require ext-xml * -> it is missing from your system. Install or enable PHP's xml extension.
Problem 2
- phpunit/phpunit[9.5.10, ..., 9.5.x-dev] require ext-dom * -> it is missing from your system. Install or enable PHP's dom extension.
- Root composer.json requires phpunit/phpunit ^9.5.10 -> satisfiable by phpunit/phpunit[9.5.10, ..., 9.5.x-dev].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/8.1/cli/php.ini
- /etc/php/8.1/cli/conf.d/10-opcache.ini
- /etc/php/8.1/cli/conf.d/10-pdo.ini
- /etc/php/8.1/cli/conf.d/20-calendar.ini
- /etc/php/8.1/cli/conf.d/20-ctype.ini
- /etc/php/8.1/cli/conf.d/20-exif.ini
- /etc/php/8.1/cli/conf.d/20-ffi.ini
- /etc/php/8.1/cli/conf.d/20-fileinfo.ini
- /etc/php/8.1/cli/conf.d/20-ftp.ini
- /etc/php/8.1/cli/conf.d/20-gettext.ini
- /etc/php/8.1/cli/conf.d/20-iconv.ini
- /etc/php/8.1/cli/conf.d/20-phar.ini
- /etc/php/8.1/cli/conf.d/20-posix.ini
- /etc/php/8.1/cli/conf.d/20-readline.ini
- /etc/php/8.1/cli/conf.d/20-shmop.ini
- /etc/php/8.1/cli/conf.d/20-sockets.ini
- /etc/php/8.1/cli/conf.d/20-sysvmsg.ini
- /etc/php/8.1/cli/conf.d/20-sysvsem.ini
- /etc/php/8.1/cli/conf.d/20-sysvshm.ini
- /etc/php/8.1/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-xml --ignore-platform-req=ext-dom` to temporarily ignore these required extensions.
you should just install ext-xml
sudo apt-get install php-xml
laravel/pint needs this package for running correctly
my answer isn't different from Farid Saravi answer , and it solved my problem too
just want to add the answer for the second problem that appeared to me
mentioning that i'm using linux ubuntu 22.04
Problem 1
Root composer.json requires laravel/pint ^1.0 -> satisfiable by laravel/pint[v1.0.0, ..., v1.2.0].
- laravel/pint[v1.0.0, ..., v1.2.0] require ext-xml * -> it is missing from your system. Install or enable PHP's xml extension.
and its answer
sudo apt-get install php-xml
Problem 2
spatie/laravel-ignition[1.0.0, ..., 1.6.1] require ext-curl * -> it is missing from your system. Install or enable PHP's curl extension.
- Root composer.json requires spatie/laravel-ignition ^1.0 -> satisfiable by spatie/laravel-ignition[1.0.0, ..., 1.6.1].
and its answer
sudo apt-get install php-curl
First, delete the project that gave error when creating. Then
Run sudo apt-get install php8.2-curl
you can change php.8.2-curl according to the PHP version you use.
After this, create a project again. It will be successfully created
I'm trying to install Laravel using composer command, which I already successfully installed.
Then, when I input $ composer global require "laravel/installer", I get the error message below that I don't understand.
Details:
MacBook Pro(Version: 10.15.3)
using Xampp
Thank you!
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/installer v3.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- laravel/installer v3.0.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- Installation request for laravel/installer ^3.0 -> satisfiable by laravel/installer[v3.0.0, v3.0.1].
Installation failed, deleting ./composer.json.
It says that it requires zip extension
brew update
brew install php#7.3
brew link php#7.3
It will install PHP 7.3.10 with the zip module. You can use PHP -v to check for the version, and PHP -m for the modules to check.
With respect to your errors Please do the following.
Add below to your ~/.bash_profile file:
export PATH="/usr/local/opt/php#7.3/bin:$PATH"
export PATH="/usr/local/opt/php#7.3/sbin:$PATH"
OR try adding the following in ~/.bashrc file
export PATH="/usr/local/opt/php#7.3/bin:$PATH"
export PATH="/usr/local/opt/php#7.3/sbin:$PATH"
This issue is already mentioned in the Laravel github repository here
As mentioned in the article. You can resolve this using below commands
brew install php#7.3
brew link php#7.3 --force
echo 'export PATH="/usr/local/opt/php#7.3/bin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/php#7.3/sbin:$PATH"' >> ~/.bashrc
I tried to install Laravel with Composer on my Debian 9 terminal with
composer global require laravel/installer
But I get the following errors:
Using version ^3.0 for laravel/installer
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/installer v3.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- laravel/installer v3.0.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- Installation request for laravel/installer ^3.0 -> satisfiable by laravel/installer[v3.0.0, v3.0.1].
To enable extensions, verify that they are enabled in your .ini files:
- /opt/lampp/etc/php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, deleting ./composer.json.
I tried to install the PHP ext Zip extension with:
apt-get install php7.4-zip
and
apt-get install php-zip
and also edit the php.ini file uncommenting the following lines:
extension=php_zip.dll
extension="zip.so"
But nothing works and I have the same errors...
Make sure to restart the webserver after the change
php -m to list the compiled modules
it happened to me once (on plesk) that composer was using a different php version than to use php itself
You could try php composer.phar(the location of that) and check the results
If Installing laravel is what matters here
here are some possible solutions
composer create-project laravel/laravel [dir]
or git clone https://github.com/laravel/laravel.git then cd to that directory, usually laravel, so cd laravel then composer install
I had the same problem as you.
I could see that I was lacking the zip extension by doing
php -m
I did
apt search php | grep zip
to see if there was a package I could install, I found php-zip, so I did
sudo apt install php-zip
after which php -m showed zip in the list.
Then I tried the command to install Laravel again
composer global require laravel/installer
and it succeeded.
I need to use the extension intl on my mac with XAMPP.
So I have followed this links:
Php-intl installation on XAMPP for Mac Lion 10.8
http://lvarayut.blogspot.it/2013/09/installing-intl-extension-in-xampp.html
I restart always my apache server but isn't installed the extension. Because if I launch:
php -m | grep intl #should return 'intl'
return empty
The command that I can't launch without it is for composer and cakephp like this:
composer create-project --prefer-dist -s dev cakephp/app cakephp3
Return me this error:
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for cakephp/cakephp 3.0.*-dev -> satisfiable by cakephp/cakephp[3.0.x-dev].
- cakephp/cakephp 3.0.x-dev requires ext-intl * -> the requested PHP extension intl is missing from your system.
Problem 2
- cakephp/cakephp 3.0.x-dev requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/bake dev-master requires cakephp/cakephp 3.0.x-dev -> satisfiable by cakephp/cakephp[3.0.x-dev].
- Installation request for cakephp/bake dev-master -> satisfiable by cakephp/bake[dev-master].
So I need to solve the problem of ext-intl with the extension intl.
Can someone help me with this problem?
How can I install this extension?
Thanks
These below steps helped me, Just in case if you are using OSX
Steps from http://www.phpzce.com/blog/view/15/installing-intl-package-on-your-mac-with-xampp
Check which php path is set i.e.
root$: which php
If you are using xampp on your mac it should be
/Applications/XAMPP/xamppfiles/bin/php
but if its
/usr/bin/php
you need to change your OSx php
root$: PATH="/Applications/XAMPP/xamppfiles/bin:${PATH}"
Install icu4c
root$: brew install icu4c
Install Intl via PECL
root$: sudo pecl update-channels
root$: sudo pecl install intl
You can check if Intl was installed successfully
root$: php -m | grep intl #should return 'intl'
Done
============================
Note:
From extensions list in /Applications/XAMPP/xamppfiles/etc/php.ini file Add / Uncomment extension=intl.so line. And restart Apache. Thanks #pazhyn
Before installing "intl" you have to install Autoconf if you have not installed it. Thanks #Digant
via Homebrew brew install autoconf automake
or
by running below commands
curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-latest.tar.gz
tar xzf autoconf-latest.tar.gz
cd autoconf-*
./configure --prefix=/usr/local
make
sudo make install
cd ..
rm -r autoconf-*
I had issues with intl when using Moodle, which I fixed by doing the following:
Re-run the XAMPP installer (if you don't have the installer on hand, download it from here) and tick the "XAMPP Developer Files"
Use your terminal and go into XAMPP's binary folder $ cd /Applications/XAMPP/bin
Use PHP's package manager to install intl by running $ sudo ./pecl install intl This should compile some things, and if successful, the installation should complete with:
Build process completed successfully
Installing '/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226/intl.so'
install ok: channel://pecl.php.net/intl-3.0.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=intl.so" to php.ini
$ cd ../etc There you will have your php.ini to which you have to add extension=intl.so On my system I appended the line after line 959, which you can find by searching for php_intl
Finally restart your Apache web server from the XAMPP GUI.
Hope this works for you!
I had the same problem with XAMPP.
I tried several answers but without success.
Could solve lowering an alternative library http://php-osx.liip.ch/.
This library php, comes already installed intl and several other package.
After downloading went to httpd.conf in xampp and LoadModule php5_module pointed to these packages in /usr/local/php5/libphp5.so
I need to use the extension intl on my mac with XAMPP.
So I have followed this links:
Php-intl installation on XAMPP for Mac Lion 10.8
http://lvarayut.blogspot.it/2013/09/installing-intl-extension-in-xampp.html
I restart always my apache server but isn't installed the extension. Because if I launch:
php -m | grep intl #should return 'intl'
return empty
The command that I can't launch without it is for composer and cakephp like this:
composer create-project --prefer-dist -s dev cakephp/app cakephp3
Return me this error:
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for cakephp/cakephp 3.0.*-dev -> satisfiable by cakephp/cakephp[3.0.x-dev].
- cakephp/cakephp 3.0.x-dev requires ext-intl * -> the requested PHP extension intl is missing from your system.
Problem 2
- cakephp/cakephp 3.0.x-dev requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/bake dev-master requires cakephp/cakephp 3.0.x-dev -> satisfiable by cakephp/cakephp[3.0.x-dev].
- Installation request for cakephp/bake dev-master -> satisfiable by cakephp/bake[dev-master].
So I need to solve the problem of ext-intl with the extension intl.
Can someone help me with this problem?
How can I install this extension?
Thanks
These below steps helped me, Just in case if you are using OSX
Steps from http://www.phpzce.com/blog/view/15/installing-intl-package-on-your-mac-with-xampp
Check which php path is set i.e.
root$: which php
If you are using xampp on your mac it should be
/Applications/XAMPP/xamppfiles/bin/php
but if its
/usr/bin/php
you need to change your OSx php
root$: PATH="/Applications/XAMPP/xamppfiles/bin:${PATH}"
Install icu4c
root$: brew install icu4c
Install Intl via PECL
root$: sudo pecl update-channels
root$: sudo pecl install intl
You can check if Intl was installed successfully
root$: php -m | grep intl #should return 'intl'
Done
============================
Note:
From extensions list in /Applications/XAMPP/xamppfiles/etc/php.ini file Add / Uncomment extension=intl.so line. And restart Apache. Thanks #pazhyn
Before installing "intl" you have to install Autoconf if you have not installed it. Thanks #Digant
via Homebrew brew install autoconf automake
or
by running below commands
curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-latest.tar.gz
tar xzf autoconf-latest.tar.gz
cd autoconf-*
./configure --prefix=/usr/local
make
sudo make install
cd ..
rm -r autoconf-*
I had issues with intl when using Moodle, which I fixed by doing the following:
Re-run the XAMPP installer (if you don't have the installer on hand, download it from here) and tick the "XAMPP Developer Files"
Use your terminal and go into XAMPP's binary folder $ cd /Applications/XAMPP/bin
Use PHP's package manager to install intl by running $ sudo ./pecl install intl This should compile some things, and if successful, the installation should complete with:
Build process completed successfully
Installing '/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226/intl.so'
install ok: channel://pecl.php.net/intl-3.0.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=intl.so" to php.ini
$ cd ../etc There you will have your php.ini to which you have to add extension=intl.so On my system I appended the line after line 959, which you can find by searching for php_intl
Finally restart your Apache web server from the XAMPP GUI.
Hope this works for you!
I had the same problem with XAMPP.
I tried several answers but without success.
Could solve lowering an alternative library http://php-osx.liip.ch/.
This library php, comes already installed intl and several other package.
After downloading went to httpd.conf in xampp and LoadModule php5_module pointed to these packages in /usr/local/php5/libphp5.so