ebextensions: yum does not install package

12,785

According to the docs:

Packages are processed in the following order: rpm, yum, and then rubygems and python.

Elastic beanstalk first processes your rpm package, causing the error and never gets to the yum packages.

There are a few ways to solve this.

1) Run the rpm install through a command like

commands:
    install_wkhtmltox:
        command: yum -y install https://s3-eu-west-1.amazonaws.com/myS3Account/wkhtmltox-0.12.2.1_linux-centos5-amd64.rpm

This should automatically solve dependencies through yum.

2) Split the .ebextensions files to two: 01_install_dependencies.config and 02_install_wkhtmltox.config. In the 01-file install yum packages, in the 02 file install the rpm. This way you can "override" the package installation order

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#customize-containers-format-packages

Share:
12,785
DkM
Author by

DkM

Updated on June 26, 2022

Comments

  • DkM
    DkM almost 2 years

    I am trying to make an ebextensions file which will install wkhtmltopdf.

    Currently it looks like this:

    packages: 
     yum:
      xorg-x11-fonts-75dpi: []
      libpng: []
      xz: [] 
      urw-fonts: []
      libXext: []
      openssl-devel: []
      libXrender: []
    rpm:
       wkhtmltopdf: https://s3-eu-west-1.amazonaws.com/myS3Account/wkhtmltox-0.12.2.1_linux-centos5-amd64.rpm
    

    In this case, wkthmltopdf fails to install. I get the following error:

    Failed dependencies:
      xorg-x11-fonts-75dpi is needed by wkhtmltox-1:0.12.2.1-1.x86_64
    

    If I use SSH to connect to my EC2 instance, I can sucessfully install wkhtml by manually running "yum install xorg-x11-fonts-75dpi", followed by "wget wkthmltopdf-..." and "rpm --install wkhtmltopdf-..". If I skip the yum step, rpm complains that wkhtmltopdf needs the xorg package.

    It seems like xorg-x11-fonts-75dpi is not installed by ebextensions on deploy. Am I doing something wrong?