1

I'm trying to install Magento 2 via composer and following this link for instructions. In step 2,

composer install

I get a php version error.

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.5.0|~5.6.0|~7.0.0 but your PHP version (5.3.29) does not satisfy that requirement.
  Problem 2
    - Installation request for magento/composer 1.0.2 -> satisfiable by magento/composer[1.0.2].
    - magento/composer 1.0.2 requires php ~5.5.0|~5.6.0|~7.0.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 3
    - Installation request for pelago/emogrifier v0.1.1 -> satisfiable by pelago/emogrifier[v0.1.1].
    - pelago/emogrifier v0.1.1 requires php >=5.4.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 4
    - Installation request for league/climate 2.6.1 -> satisfiable by league/climate[2.6.1].
    - league/climate 2.6.1 requires php >=5.4.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 5
    - Installation request for sjparkinson/static-review 4.1.1 -> satisfiable by sjparkinson/static-review[4.1.1].
    - sjparkinson/static-review 4.1.1 requires php >=5.4.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 6
    - Installation request for symfony/stopwatch v3.2.1 -> satisfiable by symfony/stopwatch[v3.2.1].
    - symfony/stopwatch v3.2.1 requires php >=5.5.9 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 7
    - colinmollenhour/php-redis-session-abstract v1.1 requires php ~5.5.0|~5.6.0|~7.0.0 -> your PHP version (5.3.29) does not satisfy that requirement.
    - colinmollenhour/php-redis-session-abstract v1.1 requires php ~5.5.0|~5.6.0|~7.0.0 -> your PHP version (5.3.29) does not satisfy that requirement.
    - Installation request for colinmollenhour/php-redis-session-abstract v1.1 -> satisfiable by colinmollenhour/php-redis-session-abstract[v1.1].

I changed my php version in cpanel to 5.5 but using php -v still showed 5.3. So I followed this link to add an alias to ~/.bashrc file

alias php=/opt/php55/bin/php

Logged out and back in to SSH and php -v returns 5.5. Went back to install composer and it showed the exact same error. I've also did what was mentioned on this answer but it didn't work either.

How do I update php for composer?

1

Magento 2 requires minimum PHP 5.5.22 and above. For more info, http://devdocs.magento.com/guides/v2.0/install-gde/system-requirements-tech.html

Hope it helps!

  • Like I said, I have upgraded to 5.5, it says I have 5.3 – VeeK Jan 4 '17 at 8:18
  • What is the exact php version? – Mike Jan 4 '17 at 8:22
  • php -v returns 5.5.38 – VeeK Jan 4 '17 at 8:24
  • I have had this kind of problem once like old versions in terminal and composer. I have set the path $ export PATH=/opt/lampp/bin/php:$PATH where the path should navigate to the new version. In your case, v5.5. Then I restarted the server and that worked for me. Maybe you should give it a try. – Mike Jan 4 '17 at 8:55
  • I'm not very familiar with this so just want to clear a few things. When I enter whereis php I get the following url /opt/php55/bin/php among other things. So do I have to write $ export PATH=/opt/php55/bin/php:$PATH, Then execute composer install? Also do I have to restart the entire server or httpd restart would do? – VeeK Jan 4 '17 at 10:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.