1

I try to update magento version from 2.1.11 to 2.2.2 because have some bugs.

So according to the documentation magento run first command via ssh:

php bin/magento composer require magento/product-community-edition 2.2.2 --no-update

Unfortunately, when I run this command, I get an error: enter image description here

anyone know how to solve it ?

EDIT: after run command

composer require magento/product-community-edition 2.2.2 --no-update

enter image description here

EDIT2: Error during check composer version: enter image description here

4 Answers 4

2

You don't need to pass php bin/magento before composer as composer is separate tool.

Run below commands in sequence.

  • composer require magento/product-community-edition 2.2.2 --no-update
  • composer update
  • rm -rf var/cache/*
  • rm -rf var/page_cache/*
  • rm -rf var/generation/*
  • bin/magento setup:upgrade
  • bin/magento cache:clean
  • bin/magento cache:flush

Then check it will works !!

6
  • Manthan, check above, I gave update topic. I still have a error when I run without php bin/magento
    – Sylvester
    Jan 30, 2018 at 17:12
  • @Sylvester run composer -v command check composer is installed or not and which version you have installed Jan 30, 2018 at 17:15
  • When I run same command "composer -v" get error "-bash: composer.phar: command not found" but when I run with "php bin/magento composer -v" get other error [I uploaded screen within 1 minutes] EDIT: topic update
    – Sylvester
    Jan 30, 2018 at 17:20
  • @Sylvester - looks like composer is not installed on your server - please installed composer and then its works Jan 30, 2018 at 17:34
  • Thanks now all works. Composer works on the command: "php composer.phar require magento/product-community-edition 2.2.2 --no-update"
    – Sylvester
    Jan 30, 2018 at 17:42
1

Is composer installed on your system? and you need to run these two commands:

composer require magento/product-community-edition 2.2.2 --no-update
composer update
7
  • yes, I have installed the composer because I have already installed several extensions by composer.
    – Sylvester
    Jan 30, 2018 at 17:05
  • you are using it with bin/magento, which is not correct
    – Manish Joy
    Jan 30, 2018 at 17:06
  • upvote, if you find the answer useful
    – Manish Joy
    Jan 30, 2018 at 17:06
  • also I run wget getcomposer.org/composer.phar php composer.phar require magento/product-community-edition 2.2.2 --no-update no work ;(
    – Sylvester
    Jan 30, 2018 at 17:07
  • When I run without "php bin/magento" I get error not found: -bash: composer: command not found
    – Sylvester
    Jan 30, 2018 at 17:08
1

you should run just:

composer require magento/product-community-edition 2.2.2 --no-update

And then you can follow: https://magento.stackexchange.com/a/115459/63124

1

You can try to use Command-line installation
https://getcomposer.org/download/
And then instead of composer - use composer.phar

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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