Ebextensions: yum does not install the package

I am trying to create an ebextensions file that 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 cannot be installed. 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 successfully install wkhtml by manually executing "yum install xorg-x11-fonts-75dpi" and then "wget ​​wkthmltopdf -..." and "rpm --install wkhtmltopdf-. . ". If I skip the yum step, rpm complains that wkhtmltopdf needs the xorg package.

It seems that xorg-x11-fonts-75dpi is not installed by ebextensions during deployment. Am I doing something wrong?

+7
amazon-web-services amazon-ec2 elastic-beanstalk
source share
1 answer

According to the docs:

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

The resilient beanstalk processes your rpm package first, causing an error and never gets into yum packages.

There are several ways to solve this problem.

1) Run rpm install with 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 resolve dependencies via yum.

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

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

+12
source share

All Articles