Unable to Install An Extension Using Composer

Keywords: Magento - AWS - Technical issue - Other
Description:
I am using Bitnami Magento 2.4.1-12 on Amazon Lightsail

I was trying to install an extension via composer. Whenever I try to execute the command sudo composer require mailchimp/mc-magento2, I am running into problem “Your requirements could not be resolved to an installable set of packages.”.

Things I have checked so far:

  1. Nothing wrong with permission
  2. Compeoser 1.*v or 2.*v both couldn’t install the package
  3. I tried to launch fresh new instance and install the package. It still running into same problem.

Hi @jayt,

Thanks for using Bitnami. According to the issue on the plugin repository linked below, you need to provide an specific version to install

https://github.com/mailchimp/mc-magento2/issues/510

Can you try the next command?

composer require mailchimp/mc-magento2:102.3.42

I also think using sudo is not necessary.

Hi @gongomgra,

I have tried the command you suggested, but it’s still not working.

When I tried to install from my bitnami user directory, it gave the error message of missing magento/framework.

So I then followed the instructions from this documentary

https://docs.bitnami.com/ibm/apps/magento/configuration/install-extension-smtp/

I run the command

cd /opt/bitnami/magento

Then try to install like you suggested by running

composer require mailchimp/mc-magento2:102.3.42

The system then prompted for authentication. After the authentication the installation process started but somehow it took too long and was killed.

The same problem exist when I tried to install other extension like stripe

composer require stripe/stripe-payments:2.5.6

I have found out the problem. According to this post I don’t have enough memory.

https://stackoverflow.com/questions/20667761/composer-killed-while-updating

and here is how to increase the memory limit

https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors

Once I increase the limit, I can download the extension via composer.

Hi @jayt,

Thanks for the info. I’m glad you fixed your issue! We will close this thread as solved. Please do not hesitate to open a new one with any other questions you may have.