skip to Main Content

I can’t install Magento 2 on Server https://prnt.sc/tqrb6n
By trying to do command composer install. Maybe some one how. How to fix this issue.

[root@junisoft junisoft.ru]# composer instal
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.3.0||~7.4.0 but your PHP version (7.1.28) does not satisfy that requirement.
  Problem 2
    - Installation request for magento/composer 1.6.0 -> satisfiable by magento/composer[1.6.0].
    - magento/composer 1.6.0 requires php ~7.3.0||~7.4.0 -> your PHP version (7.1.28) does not satisfy that requirement.

3

Answers


  1. It seems that problem is with your current php version. it would require your php7.3 version to install magento

    You can verify that your current php version by below command.

    php -v
    

    it will display the current PHP version.

    You can change command-line PHP version by below command

    update-alternatives --config php
    

    in your case to resolve above error change it to php7.3 if require you can prefix the command with the sudo access rights.

    for webversion php change you can run

    a2enmod php7.* 
    

    replace 7.* with the version you required and after that restart apache or ngix services

    incase of apache 2 you can run below command also

    /etc/init.d/apache2 restart
    

    if require sudo privilege you can run the command with the sudo access.

    Note: For some server related operation please make sure to run this command with some knowledge or you can also ask server admin help to configure the same.

    Login or Signup to reply.
  2. Try with the below way,

    Use --ignore-platform-reqs

    for example :- composer install --ignore-platform-reqs

    it’s will ignore platform requirement problem like php version and etc etc.

    Thanks.

    Login or Signup to reply.
  3. Your installed PHP version 7.1.* is not compatible with the Magento 2 version you are trying to install. The Magento 2 version that you want to install is looking for PHP 7.3.* or PHP 7.4.* which is not there on the server.

    The very first line of the error statement clearly says that your PHP version is not compatible with the Magento 2 version you are trying to install.

    You need to contact your Hosting service provider to update your PHP to the required version which is PHP7.3.* or PHP7.4.*. Only after updating your PHP, you will be able to install the Magento 2 version which is mentioned in your composer.json file.

    I found one similar article here https://technicallysound.in/magento-2-upgrade-and-composer-issues/. This explains about composer incompatibility issue with the extensions you are trying to install via Composer.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search