Trying to install laravel/ui composer is failing - laravel

I am trying to install the laravel/ui for Laravel 6.4, but when I try to install through composer I get the error message Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package laravel/framework (locked at v6.4.0, required as ^5.0) is satisfiable by laravel/framework[v6.4.0], but these conflict with your requirements or minimum-stability.
Problem 2
- laravel/framework v5.0.9 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
...
...
...
To enable extensions, verify that they are enabled in your .ini files:
...
Installation failed, reverting ./composer.json to its original content.
I have tried to install it manually as well, but to no avail. composer.json : composer.json

If mcrypt or ext-mcrypt is not enabled open your php.ini and search for
;extension=php_mcrypt.so
then remove the ; from the beginning of that line. Same procedure for the other extension.
source to find and open the file path; Laravel requires the Mcrypt PHP extension

Related

Is there anyone who can help me to install maatwebsite/excel

I have tried to install composer require maatwebsite/excel and I have tried several times but still getting errors and I'm using laravel 9.23.0 and PHP v8.0.5 here is the error.
Using version ^3.1 for maatwebsite/excel
./composer.json has been updated
Running composer update maatwebsite/excel
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- maatwebsite/excel[3.1.36, ..., 3.1.x-dev] require phpoffice/phpspreadsheet ^1.18 -> satisfiable by phpoffice/phpspreadsheet[1.18.0, ..., 1.24.1].
- maatwebsite/excel[3.1.0, ..., 3.1.25] require php ^7.0 -> your php version (8.0.5) does not satisfy that requirement.
- maatwebsite/excel[3.1.26, ..., 3.1.35] require illuminate/support 5.8.*|^6.0|^7.0|^8.0 -> found illuminate/support[v5.8.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it
conflicts with another require.
- phpoffice/phpspreadsheet[1.18.0, ..., 1.24.1] require ext-gd * -> it is missing from your system. Install or enable PHP's
gd extension.
- Root composer.json requires maatwebsite/excel ^3.1 -> satisfiable by maatwebsite/excel[3.1.0, ..., 3.1.x-dev].
To enable extensions, verify that they are enabled in your .ini files:
- C:\xampp\php\php.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-gd to temporarily ignore these required extensions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require maatwebsite/excel:*" to figure out if any version is installable, or "composer require maatwebsite/excel:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
According to docs the requirements are:
PHP: ^7.2\|^8.0
Laravel: ^5.8|^6.0|^7.0|^8.0
PhpSpreadsheet: ^1.21
psr/simple-cache: ^1.0
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
Go to the php.ini file by you xampp console. Search this ;extension=gd and remove ; then restart the server.
Check if the other php extension are enabled to.
As the error message mentioning it the PHP GD extension is missing on your system.
Google for install php gd for you system windows, mac, linux and follow the installation instructions.
For linux it will be:
sudo apt-get install php8.0-gd
If you are using a docker container, then you can use the following:
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions gd
After the gd extension is installed try to install the package again. If it fails check if there is another package missing and install it in a similar way.

I want to install composer require laravelista/comments but I get an error

I have php verison "PHP 7.4.27", composer version "2.2.4" and laravel version"4.2.9". And my error messages:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires laravelista/comments ^4.5 ->
satisfiable by laravelista/comments[4.5.0].
- laravelista/comments 4.5.0 requires illuminate/database ^8.0 ->
found illuminate/database[v8.0.0, ..., v8.79.0] but these were not loaded, likely because it
conflicts with another require.
You can also try re-running composer require with an explicit version constraint,
e.g. "composer require laravelista/comments:*" to figure out if any version is installable, or
"composer require laravelista/comments:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Why haven't install predis on laravel 8

According laravel manual https://laravel.com/docs/8.x/redis for install predis, need run: composer require predis/predis. When that command is running (for laravel 8) - appear next Error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- facade/ignition is locked to version 2.4.2 and an update of this package was not requested.
- facade/ignition 2.4.2 requires php ^7.2.5 -> your php version (8.0.0) does not satisfy that requirement.
Problem 2
- facade/ignition-contracts 1.0.1 requires php ^7.1 -> your php version (8.0.0) does not satisfy that requirement.
- nunomaduro/collision v4.3.0 requires facade/ignition-contracts ^1.0 -> satisfiable by facade/ignition-contracts[1.0.1].
- nunomaduro/collision is locked to version v4.3.0 and an update of this package was not requested.
In my composer.json: "php": "^7.2.5|^8.0",
What here is wrong))?
You need to update facade/ignition and nunomaduro/collision first to support PHP 8 in your project.
Running the following commands should update them accordingly.
composer require --dev facade/ignition nunomaduro/collision
composer require predis/predis
i run comand: composer require --dev facade/ignition nunomaduro/collision and have got new Error: Your requirements could not be resolved to an installable set of packages.
Problem 1
- facade/ignition[2.10.0, ..., 2.10.2] require facade/ignition-contracts ^1.0.2 -> found facade/ignition-contracts[1.0.2] but the package is fixed to 1.0.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- Root composer.json requires facade/ignition ^2.10 -> satisfiable by facade/ignition[2.10.0, 2.10.1, 2.10.2].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
I have new laravel 8 project (blog) && use new Vagrant Homestead (with all updates) && i use laravel 8 manual)) may be laravel developers is a little busy and is a little tired to give full instruction in manual). I think may be for Laravel8 Homestead allready is not suitable and need Docker and Sail... But project work (with the exception of predis) Now i use phpredis. May be will try use docker... As for Vagrant&&Homestead - https://laravel.com/docs/8.x/homestead#introduction i don't understand what is problem to use that technology .... god with they)...

Trying to install Laravel using composer and it says "the requested PHP extension fileinfo is missing from your system"

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 league/flysystem 1.1.3 -> satisfiable by league/flysystem[1.1.3].
- league/flysystem 1.1.3 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
Problem 2
- Installation request for league/mime-type-detection 1.4.0 -> satisfiable by league/mime-type-detection[1.4.0].
- league/mime-type-detection 1.4.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
Problem 3
- league/flysystem 1.1.3 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- laravel/framework v7.26.1 requires league/flysystem ^1.0.34 -> satisfiable by league/flysystem[1.1.3].
- Installation request for laravel/framework v7.26.1 -> satisfiable by laravel/framework[v7.26.1].
To enable extensions, verify that they are enabled in your .ini files:
- C:\xampp\php\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
You have disabled the fileinfo extension from php. To enable extension, verify that are enabled in the .ini file (find/add line "extension=fileinfo" in C:\xampp\php\php.ini).
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.
First of all, stop the XAMPP/Wamp and then kindly remove the starting semicolon ( ; ) from your xampp\php\php.ini the following code.
;extension=fileinfo
to
extension=fileinfo

Cannot install laravel with composer

I try to use the following command on my macos terminal,
composer global require laravel/installer
And I get the following error,
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].
I have tried the following solution, but that doesn't work for me,
Can't install laravel installer via composer
check your php version and update via homebrew
brew update
brew upgrade php

Resources