Skip to main content
How to Resolve unable to self-update Composer

[InvalidArgumentException] Composer self-update is not defined 

This is one of the errors which you might get at times when you are trying to update composer form an older version to the latest version. Some projects are still running on older versions of composer as there is no frequent code change required but when they do the composer needs to be updated as well and one can get stuck in this scenario where the composer doesn't understand the most common update command i.,e self-update

 

  • sudo apt-get remove composer
  • sudo apt-get update
  • sudo apt-get install curl
  • sudo curl -s https://getcomposer.org/installer | php
  • sudo mv composer.phar /usr/local/bin/composer
  • composer --version

 

 

Published on