Hi have composer 2.0.7, but now I cannot update Magento anymore. When I am using:
composer self-update --1
Upgrading to version 1.10.19 (1.x channel).
Composer update failed: "/usr/local/bin/composer" could not be written.
rename(/usr/local/bin/composer): failed to open stream: Permission denied
So, it is not set back to composer 1. What should I do to get composer 1 again?
check the following answers to give permission to composer :
to switch composer version to composer 1, you should able to use self-update command to downgrade to any version:
composer self-update 1.4.1
sudo -H composer self-update 1.4.1
Hope it helps !
Thanks for your answer!
I have solved it already. Because I have a shared hosting, I cannot change the composer version, but what I should do to use composer version 1 is just adding "v1". So in stead of composer update, I am using now composerv1 update.