I’m trying to downgrade Composer from v2.4 to v1.10.16 as instructed in How to install Magento 2.4 and build a web server
I’m getting an error message (screenshot added). I’ve tried the whole setup process twice, at first I thought I made a mistake somewhere along the way with one of the previous steps, but I no longer think it’s the case. Without downgrading Composer, I cannot install Magento 2.4. Is there a working solution?
I actually had this same issue, I had to elevate my user session to root in order to fix it.
type (as a superuser) sudo -i and then enter your super user password.
You’ll then be able to run those composer commands.
Not sure why regular sudo doesn’t work - almost certain a filesystem permission issue.
After you do it, the magento web user will be able to run composer anyway.
Thank you so much!
Your solution worked like a charm, such an easy fix…
I spent so much time looking for a workaround, I should have posted my issue here earlier