Composer Install without PHP-Imap Extension

Your software
My PHP version is 7.4.29 :

Updating/Installing Errors
I am: Installing
Installing via: Command Line

These errors are showing in the installer :

Your requirements could not be resolved to an installable set of packages.

Problem 1

  • Root composer.json requires mautic/core-lib 4.3.1 → satisfiable by mautic/core-lib[4.3.1].
  • mautic/core-lib 4.3.1 requires ext-imap * → it is missing from your system. Install or enable PHP’s imap extension.

Problem 2

  • mautic/core-lib 4.3.1 requires ext-imap * → it is missing from your system. Install or enable PHP’s imap extension.
  • mautic/theme-trulypersonal 4.3.1 requires mautic/core-lib ^4.0 → satisfiable by mautic/corelib[4.3.1].
  • Root composer.json requires mautic/theme-trulypersonal 4.3.1 → satisfiable by mautic/theme/trulypersonal[4.3.1].

Your problem
My problem is :
I would like to move to composer in order to prepare for future Mautic releases as well as maintaining 3rd party dependencies. There is no php-imap extension available on Amazon Linux 2 AMI. Surely there must be some way to create the composer package without an extension that Mautic’s website lists as optional.

Steps I have tried to fix the problem :
Adding ‘–ignore-platform-req=ext-imap’ to my composer create command. This appears to work at first but ends with the following output.

Hi there,

Mautic does require imap for some features, but that being said you should be able to install it without that extension using the commands that it prompts you to use (you need both the commands mentioned in the text at the end).

hello here,
otherwise you can always install php7.4-imap by doing this:

sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install -y php7.4
sudo apt install php7.4-{cli,fpm,json,common,mysql,zip,gd,mbstring,curl,xml,bcmath,imap,intl}

cheers