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

Sylvester
  • 2,224
  • 4
  • 27
  • 65

4 Answers4

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 !!

Manthan Dave
  • 9,816
  • 2
  • 31
  • 53
  • Manthan, check above, I gave update topic. I still have a error when I run without php bin/magento – Sylvester Jan 30 '18 at 17:12
  • @Sylvester run composer -v command check composer is installed or not and which version you have installed – Manthan Dave Jan 30 '18 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 '18 at 17:20
  • @Sylvester - looks like composer is not installed on your server - please installed composer and then its works – Manthan Dave Jan 30 '18 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 '18 at 17:42
  • @Sylvester - Happy to help , Keep Helping :) – Manthan Dave Jan 30 '18 at 17:43
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
Manish Joy
  • 1,215
  • 12
  • 27
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

Macas
  • 487
  • 4
  • 14