Failed to download doctrine/inflector from dist: The zip extension and unzip/7z commands are both missing, skipping.The php.ini used by your command-line PHP is: C:xamppphpphp.ini
Now trying to download from source
- Syncing doctrine/inflector (2.0.8) into cache
Failed to download doctrine/lexer from dist: The zip extension and unzip/7z commands are both missing, skipping.
The php.ini used by your command-line PHP is: C:xamppphpphp.ini
Now trying to download from source - Syncing doctrine/lexer (3.0.0) into cache
Failed to download symfony/polyfill-ctype from dist: The zip extension and unzip/7z commands are both missing, skipping.
The php.ini used by your command-line PHP is: C:xamppphpphp.ini
Now trying to download from source - Syncing symfony/polyfill-ctype (v1.28.0) into cache
Failed to download webmozart/assert from dist: The zip extension and unzip/7z commands are both missing, skipping.
The php.ini used by your command-line PHP is: C:xamppphpphp.ini
Now trying to download from source - Syncing webmozart/assert (1.11.0) into cache
Failed to download dragonmantank/cron-expression from dist: The zip extension and unzip/7z commands are both missing, skipping.
The php.ini used by your command-line PHP is: C:xamppphpphp.ini
Now trying to download from source - Syncing dragonmantank/cron-expression (v3.3.3) into cache
Failed to download symfony/deprecation-contracts from dist: The zip extension and unzip/7z commands are both missing, skipping.
The php.ini used by your command-line PHP is: C:xamppphpphp.ini
Now trying to download from source - Syncing symfony/deprecation-contracts (v3.3.0) into cache
Failed to download psr/container from dist: The zip extension and unzip/7z commands are both missing, skipping.
The php.ini used by your command-line PHP is: C:xamppphpphp.ini
Now trying to download from source - Syncing psr/container (2.0.2) into cache
Failed to download fakerphp/faker from dist: The zip extension and unzip/7z commands are both missing, skipping.
The php.ini used by your command-line PHP is: C:xamppphpphp.ini
Now trying to download from source - Syncing fakerphp/faker (v1.23.0) into cache
Failed to download symfony/polyfill-php80 from dist: The zip extension and unzip/7z commands are both missing, skipping.
The php.ini used by your command-line PHP is: C:xamppphpphp.ini
Now trying to download from source - Syncing symfony/polyfill-php80 (v1.28.0) into cache
Failed to download symfony/polyfill-php83 from dist: The zip extension and unzip/7z commands are both missing, skipping.
The php.ini used by your command-line PHP is: C:xamppphpphp.ini
Now trying to download from source - Syncing symfony/polyfill-php83 (v1.28.0) into cache
Failed to download symfony/polyfill-mbstring from dist: The zip extension and unzip/7z commands are both missing, skipping.
2
Answers
It seems like you’re facing troubles installing or updating packages with Composer in XAMPP due to missing zip-related tools and extensions. To fix this, follow these steps:
Enable Zip Extension:
Open your XAMPP installation folder, go to the "php" directory, and locate the php.ini file. Look for the line containing extension=php_zip.dll and remove the semicolon at the beginning to enable the extension.
Install 7-Zip:
If you’re using Windows, download and install 7-Zip from its official website: https://www.7-zip.org/.
Install Unzip (Unix-like systems):
For Unix-like systems (Linux, macOS), use your package manager to install unzip. For example, on Ubuntu, you can run: sudo apt-get install unzip.
Restart XAMPP:
After making changes, restart your XAMPP server.
Now, you should be able to run Composer without issues:
Make sure the version of laravel you are trying to install in supported by your current computer setup
Make sure you have these:
On Mac:
On Windows:
Small Suggestion: Use VS Code Terminal instead of command prompt (If you are on Windows)
After you satisfy all these requirements
Create New laravel project with following command:
If you still encounter issues use the following command to ignore the platform requirements:
This should solve your problem. Thanks!