I am using Laravel 5.4, PHP 7.0.30 and Ubuntu. As I type the command sudo composer require owen-it/laravel-auditing to install Laravel-Auditing, I get the following errors:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- symfony/css-selector v4.1.4 requires php ^7.1.3 -> your PHP version (7.0.30) does not satisfy that requirement.
- symfony/css-selector v4.1.4 requires php ^7.1.3 -> your PHP version (7.0.30) does not satisfy that requirement.
- symfony/css-selector v4.1.4 requires php ^7.1.3 -> your PHP version (7.0.30) does not satisfy that requirement.
- Installation request for symfony/css-selector == 4.1.4.0 -> satisfiable by symfony/css-selector[v4.1.4].
Installation failed, reverting ./composer.json to its original content.
It's not feasible to upgrade PHP version right now either.
Please help !
Related
So I'm trying to install a basic Sage theme, but I keep getting this error:
click here for the error or read below
PHP 8.0.2 causes some problems and I am stuck with finding a solution...
Can somebody give me some tips on what I should do?
error:
$ composer create-project roots/sage my-first-sage-theme
Creating a "roots/sage" project at "./my-first-sage-theme"
Installing roots/sage (9.0.10)
- Installing roots/sage (9.0.10): Extracting archive
Created project in D:\FUN\My-First-Sage-Website\wp-content\themes\my-first-sage-theme
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.
Problem 1
- illuminate/config is locked to version v5.6.39 and an update of this package was not requested.
- illuminate/config v5.6.39 requires php ^7.1.3 -> your php version (8.0.2) does not satisfy that requirement.
Problem 2
- illuminate/container is locked to version v5.6.39 and an update of this package was not requested.
- illuminate/container v5.6.39 requires php ^7.1.3 -> your php version (8.0.2) does not satisfy that requirement.
Problem 3
- illuminate/contracts is locked to version v5.6.39 and an update of this package was not requested.
- illuminate/contracts v5.6.39 requires php ^7.1.3 -> your php version (8.0.2) does not satisfy that requirement.
Problem 4
- illuminate/events is locked to version v5.6.39 and an update of this package was not requested.
- illuminate/events v5.6.39 requires php ^7.1.3 -> your php version (8.0.2) does not satisfy that requirement.
Problem 5
- illuminate/filesystem is locked to version v5.6.39 and an update of this package was not requested.
- illuminate/filesystem v5.6.39 requires php ^7.1.3 -> your php version (8.0.2) does not satisfy that requirement.
Problem 6
- illuminate/support is locked to version v5.6.39 and an update of this package was not requested.
- illuminate/support v5.6.39 requires php ^7.1.3 -> your php version (8.0.2) does not satisfy that requirement.
Problem 7
- illuminate/view is locked to version v5.6.39 and an update of this package was not requested.
- illuminate/view v5.6.39 requires php ^7.1.3 -> your php version (8.0.2) does not satisfy that requirement.
Problem 8
- illuminate/console is locked to version v5.6.39 and an update of this package was not requested.
- illuminate/console v5.6.39 requires php ^7.1.3 -> your php version (8.0.2) does not satisfy that requirement.
Problem 9
- paragonie/random_compat is locked to version v9.99.99 and an update of this package was not requested.
- paragonie/random_compat v9.99.99 requires php ^7 -> your php version (8.0.2) does not satisfy that requirement.
Problem 10
- illuminate/config v5.6.39 requires php ^7.1.3 -> your php version (8.0.2) does not satisfy that requirement.
- roots/sage-lib 9.0.9 requires illuminate/config ~5.6 -> satisfiable by illuminate/config[v5.6.39].
- roots/sage-lib is locked to version 9.0.9 and an update of this package was not requested.
It's possible it won't work with PHP8. However, if you'd like to try, use the flag "--ignore-platform-reqs" on your install.
use the below command:
composer install --ignore-platform-reqs
and update your composer.json file PHP version and platform-check:
"platform-check": false,
"require": {
"php": ">=8.0.2",
"roots/acorn": "^2.0"
}
I am getting the error when installing a laravel Package.
Please help me out. I am using PHP Version 8.0.2 and Laravel Framework 8.15.0
$ composer require hnhdigital-os/laravel-number-converter
here is the error
**
Using version ^1.1 for hnhdigital-os/laravel-number-converter
./composer.json has been updated Running composer update
hnhdigital-os/laravel-number-converter Loading composer repositories
with package information Updating dependencies Your requirements could
not be resolved to an installable set of packages.
Problem 1
- spatie/laravel-permission is locked to version 3.17.0 and an update of this package was not requested.
- spatie/laravel-permission 3.17.0 requires php ^7.2.5 -> your php version (8.0.2) does not satisfy that requirement.
Problem 2
- yajra/laravel-datatables-oracle is locked to version v9.14.1 and an update of this package was not requested.
- yajra/laravel-datatables-oracle v9.14.1 requires php ^7.1.3 -> your php version (8.0.2) does not satisfy that requirement.
Problem 3
- dompdf/dompdf v0.8.6 requires php ^7.1 -> your php version (8.0.2) does not satisfy that requirement.
- barryvdh/laravel-dompdf v0.8.7 requires dompdf/dompdf ^0.8 -> satisfiable by dompdf/dompdf[v0.8.6].
- barryvdh/laravel-dompdf is locked to version v0.8.7 and an update of this package was not requested. Installation failed,
reverting ./composer.json and ./composer.lock to their original
content.
**
Am currently attempting to get my Laravel application running behind Plesk Onyx. Now when trying to run composer install, I get the following error messages:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for doctrine/inflector v1.3.0 -> satisfiable by doctrine/inflector[v1.3.0].
- doctrine/inflector v1.3.0 requires php ^7.1 -> your PHP version (7.0.27) does not satisfy that requirement.
Problem 2
- Installation request for symfony/css-selector v4.0.6 -> satisfiable by symfony/css-selector[v4.0.6].
- symfony/css-selector v4.0.6 requires php ^7.1.3 -> your PHP version (7.0.27) does not satisfy that requirement.
Problem 3
- Installation request for symfony/event-dispatcher v4.0.6 -> satisfiable by symfony/event-dispatcher[v4.0.6].
- symfony/event-dispatcher v4.0.6 requires php ^7.1.3 -> your PHP version (7.0.27) does not satisfy that requirement.
Problem 4
- Installation request for symfony/translation v4.0.6 -> satisfiable by symfony/translation[v4.0.6].
- symfony/translation v4.0.6 requires php ^7.1.3 -> your PHP version (7.0.27) does not satisfy that requirement.
Problem 5
- Installation request for doctrine/instantiator 1.1.0 -> satisfiable by doctrine/instantiator[1.1.0].
- doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (7.0.27) does not satisfy that requirement.
Problem 6
- doctrine/inflector v1.3.0 requires php ^7.1 -> your PHP version (7.0.27) does not satisfy that requirement.
- laravel/framework v5.5.39 requires doctrine/inflector ~1.1 -> satisfiable by doctrine/inflector[v1.3.0].
- Installation request for laravel/framework v5.5.39 -> satisfiable by laravel/framework[v5.5.39].
OK. I understand the errors for sure. I run Debian 9 and "PHP by OS Vendor" is 7.0.27. However, I know that PHP 7.1+ (and even 7.2) is installed on the server, because Plesk'd let me choose (for domains and vhosts) these versions. My question now is: How can I tell composer to use a certain PHP version installed on the server, and how could this work under Debian with Plesk?
Edit: I did not install Composer globally. Just https://getcomposer.org/download/ "Command-line installation".
Here's how:
Find the PHP paths used by Plesk. In my case, this is /opt/plesk/php/. Inside this folder, there are the folders according to PHP versions installed: 7.0, 7.1, 7.2. So php composer.phar install becomes /opt/plesk/php/7.2/bin/php composer.phar install. & it works. :-)
You may use platform setting in composer.json to emulate PHP version:
"config": {
"platform": {
"php": "7.1"
}
},
Composer will assume that PHP version is 7.1 during installation and update, even if you're using 7.0 to actual install.
This will only affect Composer installation and update - if you want to run console commands of your app, you will need to use correct binary (same for web server). However setting this will make your Composer installs and updates more predictable, so it's worth doing it anyway.
There are multiple PHP versions in my PC. I want to use PHP 5.6.27 to create a new project named "blog". I use "laravel new blog" but it shows these errors:
Crafting application...
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
- This package requires php >=7.0.0 but your PHP version (5.6.27) does not satisfy that requirement.
Problem 2
- Installation request for doctrine/inflector v1.2.0 -> satisfiable by doctrine/inflector[v1.2.0].
- doctrine/inflector v1.2.0 requires php ^7.0 -> your PHP version (5.6.27) does not satisfy that requirement.
Problem 3
- Installation request for laravel/framework v5.5.2 -> satisfiable by laravel/framework[v5.5.2].
- laravel/framework v5.5.2 requires php >=7.0 -> your PHP version (5.6.27) does not satisfy that requirement.
Problem 4
- Installation request for swiftmailer/swiftmailer v6.0.1 -> satisfiable by swiftmailer/swiftmailer[v6.0.1].
- swiftmailer/swiftmailer v6.0.1 requires php >=7.0.0 -> your PHP version (5.6.27) does not satisfy that requirement
I'm on a new development machine, and I'm having issues installing Laravel, Spark, or just about anything that requires anything newer than PHP 5.5.30.
The problem is, I'm using MAMP Pro which IS running PHP 7.0.1. I've also tried to update my system's PHP version to PHP 7 using this tutorial: https://coolestguidesontheplanet.com/upgrade-php-on-osx/
☁ /webroot spark new app
Crafting application...
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
- This package requires php >=5.6.4 but your PHP version (5.5.30) does not satisfy that requirement.
Problem 2
- Installation request for laravel/framework v5.3.20 -> satisfiable by laravel/framework[v5.3.20].
- laravel/framework v5.3.20 requires php >=5.6.4 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 3
- Installation request for phpunit/php-code-coverage 4.0.1 -> satisfiable by phpunit/php-code-coverage[4.0.1].
- phpunit/php-code-coverage 4.0.1 requires php ^5.6 || ^7.0 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 4
- Installation request for phpunit/phpunit 5.6.2 -> satisfiable by phpunit/phpunit[5.6.2].
- phpunit/phpunit 5.6.2 requires php ^5.6 || ^7.0 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 5
- Installation request for phpunit/phpunit-mock-objects 3.4.0 -> satisfiable by phpunit/phpunit-mock-objects[3.4.0].
- phpunit/phpunit-mock-objects 3.4.0 requires php ^5.6 || ^7.0 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 6
- Installation request for sebastian/code-unit-reverse-lookup 1.0.0 -> satisfiable by sebastian/code-unit-reverse-lookup[1.0.0].
- sebastian/code-unit-reverse-lookup 1.0.0 requires php >=5.6 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 7
- Installation request for sebastian/object-enumerator 1.0.0 -> satisfiable by sebastian/object-enumerator[1.0.0].
- sebastian/object-enumerator 1.0.0 requires php >=5.6 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 8
- Installation request for sebastian/resource-operations 1.0.0 -> satisfiable by sebastian/resource-operations[1.0.0].
- sebastian/resource-operations 1.0.0 requires php >=5.6.0 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 9
- Installation request for sebastian/version 2.0.0 -> satisfiable by sebastian/version[2.0.0].
- sebastian/version 2.0.0 requires php >=5.6 -> your PHP version (5.5.30) does not satisfy that requirement.
Application ready! Build something amazing.
Downloading Spark...
I don't want to just bypass the required PHP version by editing in the composer file, because I'm not sure if it's causing problems when installing apps or not. None of my Spark or Laravel installations work, they just give a 500 status error, it could be something else, but I was assuming it was this same problem.
All fixed.
Thanks #Kyslik for your suggestion.
I had previously tried updating my PATH, but for some reason it worked this time. I must have made a mistake before. For reference of anyone else having this issue, I followed this:
How to override the path of PHP to use the MAMP path?