Missing PHP extension when installing Laravel on Mac - laravel

I am trying to install laravel on mac using terminal, but I am getting this error. I have php version 7.3 and the latest version of composer. How do I download the php exstensions using terminal on Mac.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/installer v2.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- laravel/installer v2.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- laravel/installer v2.0.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- laravel/installer v2.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- Installation request for laravel/installer ^2.0 -> satisfiable by laravel/installer[v2.0.0, v2.0.1].
To enable extensions, verify that they are enabled in your .ini files:
- /usr/local/php5/lib/php.ini
- /usr/local/php5/php.d/10-extension_dir.ini
- /usr/local/php5/php.d/20-extension-opcache.ini
- /usr/local/php5/php.d/40-curl.ini
- /usr/local/php5/php.d/40-openssl.ini
- /usr/local/php5/php.d/50-extension-apcu.ini
- /usr/local/php5/php.d/50-extension-curl.ini
- /usr/local/php5/php.d/50-extension-gmp.ini
- /usr/local/php5/php.d/50-extension-igbinary.ini
- /usr/local/php5/php.d/50-extension-imap.ini
- /usr/local/php5/php.d/50-extension-intl.ini
- /usr/local/php5/php.d/50-extension-mcrypt.ini
- /usr/local/php5/php.d/50-extension-mongodb.ini
- /usr/local/php5/php.d/50-extension-mssql.ini
- /usr/local/php5/php.d/50-extension-pdo_pgsql.ini
- /usr/local/php5/php.d/50-extension-pgsql.ini
- /usr/local/php5/php.d/50-extension-propro.ini
- /usr/local/php5/php.d/50-extension-raphf.ini
- /usr/local/php5/php.d/50-extension-readline.ini
- /usr/local/php5/php.d/50-extension-redis.ini
- /usr/local/php5/php.d/50-extension-xsl.ini
- /usr/local/php5/php.d/99-liip-developer.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.

Was recently experiencing the same issue. This is what fixed it for me:
download PHP from brew (brew install php)
make system use that version of PHP instead of the pre-installed PHP
edit ~/.zshrc or ~/.bashrc to add the following:
export PATH="/usr/local/opt/php#7.3/bin:$PATH"
export PATH="/usr/local/opt/php#7.3/sbin:$PATH"
Then run
source ~/.zshrc
or
source ~/.bashrc
After I did that Laravel installed with no issues!

Related

Trying to configure MAMP for Magento

I'm working to install Magento 2 on my Mac so I can develop with JetBrains PhpStorm and exchange with my company's server.
I've got MAMP installed and but in working to install Magento 2.3.5-p1, I needs some php extensions set and I'm not certain how to do this.
I need intl, ext-zip and possibly others on. This is what I'm seeing:
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.3.5-p1
Creating a "magento/project-community-edition=2.3.5-p1" project at "./project-community-edition"
Installing magento/project-community-edition (2.3.5-p1)
Installing magento/project-community-edition (2.3.5-p1): Extracting archive
Created project in /Applications/MAMP/htdocs/project-community-edition
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 magento/product-community-edition 2.3.5-p1 -> satisfiable by magento/product-community-edition[2.3.5-p1].
- magento/product-community-edition 2.3.5-p1 requires ext-intl * -> it is missing from your system. Install or enable PHP's intl extension.
Problem 2
- Root composer.json requires dealerdirect/phpcodesniffer-composer-installer ^0.5.0 -> satisfiable by dealerdirect/phpcodesniffer-composer-installer[v0.5.0].
- dealerdirect/phpcodesniffer-composer-installer v0.5.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
Problem 3
- magento/magento2-functional-testing-framework[2.6.4, ..., 2.6.6] require php-webdriver/webdriver ^1.8.0 -> satisfiable by php-webdriver/webdriver[1.8.0, ..., 1.10.0].
- php-webdriver/webdriver[1.8.0, ..., 1.10.0] require ext-zip * -> it is missing from your system. Install or enable PHP's zip extension.
- Root composer.json requires magento/magento2-functional-testing-framework ~2.6.4 -> satisfiable by magento/magento2-functional-testing-framework[2.6.4, 2.6.5, 2.6.6].
You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.
Thanks.

MongoDB Your requirements could not be resolved to an installable set of packages

I am trying to install "jenssegers/mongodb": "^3.6" with composer for a laravel 6 project, my command line is looking at (MongoDB shell version v4.2.0), my PHP version is 7.2, I have 7.2 Thread Safe (TS) x86 driver installed and I have the extension enabled in the php.ini file, any help appreciated, thank you.
Problem 1
- mongodb/mongodb 1.5.0 requires ext-mongodb ^1.6 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb v1.5.x-dev requires ext-mongodb ^1.6 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.6.x-dev requires ext-mongodb ^1.6 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.5.0 requires ext-mongodb ^1.6 -> the requested PHP extension mongodb is missing from your system.
- Installation request for mongodb/mongodb ^1.5.0 -> satisfiable by mongodb/mongodb[1.5.0, 1.6.x-dev, v1.5.x-dev].
To enable extensions, verify that they are enabled in your .ini
files:
- C:\WINDOWS\php.ini You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.
Found the solution and It was php.ini file not saving when editing with notepad++. So opened the ini file with admin permission.

I want to create image intervention

For user profile I want to create profile picture, but when I write composer require intervention/image in terminal I get this error:
- intervention/image 2.4.1 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- intervention/image 2.4.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- Installation request for intervention/image ^2.4 -> satisfiable by intervention/image[2.4.0, 2.4.1].
To enable extensions, verify that they are enabled in your .ini files:
- C:\AppServ\php5\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
Read what Composer suggests. Just install the PHP extenion fileinfo. Check the installation guide on PHP.net: http://php.net/manual/en/fileinfo.installation.php
Make sure you have the php_fileinfo.dll in your php/ext folder. Then uncomment this line in your php.ini
extension=php_fileinfo.dll

how to install package with composer?

I am trying to install a push-notification library for codeigniter using composer fromhere .But when i do run a command it throws this error -> Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for wrep/notificato ^1.2 -> satisfiable by wrep/notificato[1.2.0].
- wrep/notificato 1.2.0 requires ext-sockets * -> the requested PHP extension sockets is missing from your system.
To enable extensions, verify that they are enabled in your .ini files:
- E:\xampp\php\php.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
I also did commented the php.ini extension=php_intl.dll and also its the same error occuring. How can i solve this?

Error while installing laravel installation via github

Problem 1
Installation request for laravel/framework v5.2.16 -> satisfiable by laravel/framework[v5.2.16].
laravel/framework v5.2.16 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
To enable extensions, verify that they are enabled in those .ini files:
/etc/php/7.0/cli/php.ini
/etc/php/7.0/cli/conf.d/10mysqlnd.ini
/etc/php/7.0/cli/conf.d/10opcache.ini
/etc/php/7.0/cli/conf.d/10pdo.ini
/etc/php/7.0/cli/conf.d/20calendar.ini
/etc/php/7.0/cli/conf.d/20ctype.ini
/etc/php/7.0/cli/conf.d/20exif.ini
/etc/php/7.0/cli/conf.d/20fileinfo.ini
/etc/php/7.0/cli/conf.d/20ftp.ini
/etc/php/7.0/cli/conf.d/20gettext.ini
/etc/php/7.0/cli/conf.d/20iconv.ini
/etc/php/7.0/cli/conf.d/20json.ini
/etc/php/7.0/cli/conf.d/20mysqli.ini
/etc/php/7.0/cli/conf.d/20pdo_mysql.ini
/etc/php/7.0/cli/conf.d/20phar.ini
/etc/php/7.0/cli/conf.d/20posix.ini
/etc/php/7.0/cli/conf.d/20readline.ini
/etc/php/7.0/cli/conf.d/20shmop.ini
/etc/php/7.0/cli/conf.d/20sockets.ini
/etc/php/7.0/cli/conf.d/20sysvmsg.ini
/etc/php/7.0/cli/conf.d/20sysvsem.ini
/etc/php/7.0/cli/conf.d/20sysvshm.ini
/etc/php/7.0/cli/conf.d/20tokenizer.ini
/etc/php/7.0/cli/conf.d/20zlib.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.
You need to recompile php with mbstring. (out of the scope of this question)
here's a php7 fork of mbstring

Resources