Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Axeia's avatar

Installing composer/laravel for the first time, minimum-stability issue

Hello,

I'm new to both composer and laravel and I'm running into a problem with the very first step to getting started. I downloaded composer with:

curl -sS https://getcomposer.org/installer | php

then I tried to install laravel with the command

/usr/bin/composer.phar global require "laravel/composer"

But as I was getting this error:

Could not find package laravel/composer at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability

I googled around a little bit and ended up running /usr/bin/composer.phar diag which mentioned composer.json FAIL and Checking pubkeys: FAIL along with a You are not running the latest stable version run composer-self-update to update etc etc. So as asked to do I ran /usr/bin/composer.phar self-update which ran fine.

I ran the diag again and only got a fail on Checking composer.json everything else checked out fine this time. Then I ran /usr/bin/composer.phar global require "laravel/composer" once more but got the same stability error as I got previously. Can I fix this with a command or do I need to create a JSON file in the home .composer/ directory and what should be in there?

PS: I have no desire to run the virtual machine even though it would be a lot more starter friendly, my server machine is short on resources

0 likes
4 replies
jlrdw's avatar
jlrdw
Best Answer
Level 75

Did you read on down the other way to install

Via Composer Create-Project

Alternatively, you may also install Laravel by issuing the Composer create-project command in your terminal:

composer create-project --prefer-dist laravel/laravel blog
Axeia's avatar

Thank you, I did indeed run that not too long after writing this post and that does run successfully :).

rehmanmustafa92's avatar

not working for me

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

Problem 1 - laravel/framework[v11.9.0, ..., v11.23.5] require league/flysystem ^3.8.0 -> satisfiable by league/flysystem[3.8.0, ..., 3.28.0]. - league/flysystem[3.3.0, ..., 3.14.0] require league/mime-type-detection ^1.0.0 -> satisfiable by league/mime-type-detection[1.0.0, ..., 1.15.0]. - league/flysystem[3.15.0, ..., 3.28.0] require league/flysystem-local ^3.0.0 -> satisfiable by league/flysystem-local[3.15.0, ..., 3.28.0]. - league/mime-type-detection[1.0.0, ..., 1.3.0] require php ^7.2 -> your php version (8.3.11) does not satisfy that requirement. - league/mime-type-detection[1.4.0, ..., 1.15.0] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension. - league/flysystem-local[3.15.0, ..., 3.28.0] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension. - Root composer.json requires laravel/framework ^11.9 -> satisfiable by laravel/framework[v11.9.0, ..., v11.23.5].

To enable extensions, verify that they are enabled in your .ini files: - C:\Program Files\php-8.3.11\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=e

tykus's avatar

it@rehmanmustafa92 you need to ensure that you have installed the following PHP extensions

  • Ctype PHP Extension
  • cURL PHP Extension
  • DOM PHP Extension
  • Fileinfo PHP Extension
  • Filter PHP Extension
  • Hash PHP Extension
  • Mbstring PHP Extension
  • OpenSSL PHP Extension
  • PCRE PHP Extension
  • PDO PHP Extension
  • Session PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension

https://laravel.com/docs/11.x/deployment#server-requirements

The error message complains about the ext-fileinfo PHP extension specifically; you must enable it

Please or to participate in this conversation.