How to install PHP IMAP extension on Elastic Beanstalk Using .ebextensions?

0

Hi,

I'm going crazy trying to install PHP IMAP on AMAZON LINUX 2.

I'm using PHP 8.1.25

If you look for it on the Internet, you will find a similar question on stackoverflow and if you check the accepted answer, you will see:

Create two files inside .ebextensions as follow:

installdependencies.config, install php common if it is required

commands:
  01_install_phpcommon:
    command:
      sudo yum -y install php70-common

phpini.config, install php imap and enable imap

commands:
  02_install_phpimap:
    command:
      sudo yum -y install php70-imap

files:
  "/etc/php.d/zzzphp.ini":
    mode: "644"
    content: |
      extension=imap.so

Of course, I changed php70 to php81 in all the cases.

However, if I log into my sv and run:

cat /var/log/eb-engine.log

I can see the following error message:

2023/12/04 10:09:52.484504 [INFO] Executing cleanup logic
2023/12/04 10:09:52.484598 [INFO] CommandService Response: {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"Engine execution has encountered an error.","returncode":1,"events":[{"msg":"Instance deployment failed. For details, see 'eb-engine.log'.","timestamp":1701684592484,"severity":"ERROR"}]}]}
carlos
已提問 5 個月前檢視次數 142 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南