cancel
Showing results for 
Search instead for 
Did you mean: 

Set composer back to composer 1x

Set composer back to composer 1x

Hi have composer 2.0.7, but now I cannot update Magento anymore. When I am using:

 

composer self-update --1

 

It says:

Upgrading to version 1.10.19 (1.x channel).

 

 [Composer\Downloader\FilesystemException]                                  

  Filesystem exception:                                                      

  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?

2 REPLIES 2

Re: Set composer back to composer 1x

Hello @alexander_jorda 

 

check the following answers to give permission to composer :

https://stackoverflow.com/questions/30956424/permission-denied-for-composer-in-usr-local-bin

 

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

or

sudo -H composer self-update 1.4.1

 

Hope it helps !

Problem Solved ? Click on 'Kudos' & Accept as Solution to encourage to write more answers !

Re: Set composer back to composer 1x

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.