Mattiman
4 years ago
775
12
General

Composer using wrong php version

Posted 4 years ago by Mattiman

On my mac I use AMMPS, with PHP version 5.5.12. However, when I try to install Laravel I get the error:

Created project in laravel51
> php -r "copy('.env.example', '.env');"
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - This package requires php >=5.5.9 but your PHP version (5.4.28) does not satisfy that requirement.
  Problem 2
    - laravel/framework v5.1.7 requires php >=5.5.9 -> your PHP version (5.4.28) does not satisfy that requirement.
    - laravel/framework v5.1.6 requires php >=5.5.9 -> your PHP version (5.4.28) does not satisfy that requirement.
    - laravel/framework v5.1.5 requires php >=5.5.9 -> your PHP version (5.4.28) does not satisfy that requirement.
    - laravel/framework v5.1.4 requires php >=5.5.9 -> your PHP version (5.4.28) does not satisfy that requirement.
    - laravel/framework v5.1.3 requires php >=5.5.9 -> your PHP version (5.4.28) does not satisfy that requirement.
    - laravel/framework v5.1.2 requires php >=5.5.9 -> your PHP version (5.4.28) does not satisfy that requirement.
    - laravel/framework v5.1.1 requires php >=5.5.9 -> your PHP version (5.4.28) does not satisfy that requirement.
    - laravel/framework v5.1.0 requires php >=5.5.9 -> your PHP version (5.4.28) does not satisfy that requirement.
    - Installation request for laravel/framework 5.1.* -> satisfiable by laravel/framework[v5.1.0, v5.1.1, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7].

So it seems that composer thinks I'm using a different PHP version. So I can't install Laravel and its dependencies. How can I solve this?

Please sign in or create an account to participate in this conversation.