Salta al contenuto

Elastic Beanstalk - yum does not have package available - Python 3.9 AL2023 version 4.1.3

0

I'm attempting to install the packages from this Elastic Beanstalk configuration

packages:
  yum:
    gcc: []
    python3-devel: []
    python3-pip: []
    libffi-devel: []
    mariadb105-devel.x86_64: []

The cfn-init.log is showing

2024-08-14 20:12:41,756 [ERROR] -----------------------BUILD FAILED!------------------------
2024-08-14 20:12:41,757 [ERROR] Unhandled exception during build: Yum does not have libffi-devel available for installation

I've confirmed this package is available in Amazon Linux 2023 , and I've successfully installed it using yum on an EC2 instance I launched just to test this issue.

posta un anno fa384 visualizzazioni
2 Risposte
0

Hello.

This is a fairly old stackoverflow answer, but a similar question was asked.
Apparently, when I try to install "libffi-devel" with yum, "libjpeg-turbo-devel" is installed instead.
https://stackoverflow.com/questions/25860084/error-trying-to-install-libjpeg-devel-with-elastic-beanstalk

Indeed, when I started Amazon Linux 2023 with my AWS account and checked, "libjpeg-turbo-devel" was installed.

[root@ip-172-31-38-40 ~]# yum install libjpeg-devel
Last metadata expiration check: 0:02:25 ago on Thu Aug 15 00:04:41 2024.
Dependencies resolved.
==================================================================================================================================================================================================================
 Package                                                Architecture                              Version                                                    Repository                                      Size
==================================================================================================================================================================================================================
Installing:
 libjpeg-turbo-devel                                    x86_64                                    2.1.4-2.amzn2023.0.5                                       amazonlinux                                     99 k
Installing dependencies:
 cmake-filesystem                                       x86_64                                    3.22.2-1.amzn2023.0.4                                      amazonlinux                                     16 k
 libjpeg-turbo                                          x86_64                                    2.1.4-2.amzn2023.0.5                                       amazonlinux                                    190 k

Transaction Summary
==================================================================================================================================================================================================================
Install  3 Packages

Total download size: 305 k
Installed size: 1.0 M
Is this ok [y/N]:
ESPERTO
con risposta un anno fa
0

I was able to resolve this!

I SSHd into the EC2 instance created by Elastic Beanstalk. From there, I tried to install the package manually, but it also failed with a more informative 403: Forbidden for any yum-related commands to the Amazon Linux 2023 repos. It turns out I had a S3 VPC Endpoint policy set up to allow connections to the repos for the previous versions of Amazon Linux, but I hadn't updated them for Amazon Linux 2023. After I adjusted the endpoint policy, I was able to install the package successfully.

It seems the deployment utilities catch the installation error but return a much more generic description of 'Unable to install', when the actual text of the error message would have been very helpful.

con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.