I'm busy setting up a new Laravel 6 Project (on Debian 10 with php8.0), which was all working fine.
cd /opt/laravel/
Install local composer to current directory /opt/laravel/
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
Create the Laravel 6 Project
php composer.phar create-project --prefer-dist laravel/laravel testapp "6.*"
This seems to work fine, then install local composer for this project
cd /opt/laravel/testapp
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
But when I try to install laravel/ui
php composer.phar require laravel/ui --dev
I'm getting a big fat error
Using version ^3.4 for laravel/ui
./composer.json has been updated
Running composer update laravel/ui
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/ui[v3.4.0, ..., 3.x-dev] require illuminate/console ^8.42|^9.0 -> found illuminate/console[v8.42.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires laravel/ui ^3.4 -> satisfiable by laravel/ui[v3.4.0, ..., 3.x-dev].
You can also try re-running composer require with an explicit version constraint, e.g. "composer require laravel/ui:*" to figure out if any version is installable, or "composer require laravel/ui:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Is there something in my set up causing this install to fail?
CodePudding user response:
try running
composer update
if that doesnt work try
composer dump-autoload
but do you need the --dev version? perhaps just the vanilla version would work for you?
php composer.phar require laravel/ui