Skip to content

Instantly share code, notes, and snippets.

@armetiz
Created May 7, 2019 14:21
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save armetiz/bd639d2bf1b009ba4bd15e406781858a to your computer and use it in GitHub Desktop.
Save armetiz/bd639d2bf1b009ba4bd15e406781858a to your computer and use it in GitHub Desktop.
wkhtmltox-0.12.5-1 AWS ElasticBeanstalk AMI 2018.03
packages:
yum:
zlib: []
fontconfig: []
freetype: []
libX11: []
libXext: []
libXrender: []
xorg-x11-fonts-75dpi: []
xorg-x11-fonts-Type1: []
commands:
"01-libpng-download":
command: curl -o /tmp/libpng-1.5.15.tar.gz https://sourceforge.net/projects/libpng/files/libpng15/older-releases/1.5.15/libpng-1.5.15.tar.gz/download
"02-libpng-extract":
command: mkdir /tmp/libpng-1.5.15 && tar xzvf /tmp/libpng-1.5.15.tar.gz -C /tmp
"03-libpng-compilation":
command: cd /tmp/libpng-1.5.15 && ./configure && sudo make install
"04-libpng-clean":
command: sudo rm -rf /tmp/libpng-1.5.15*
packages:
rpm:
wkhtmltox: https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos6.x86_64.rpm
@ankitsam
Copy link

Sourceforge url does not download directly anymore.
Need to change to direct file url https://excellmedia.dl.sourceforge.net/project/libpng/libpng15/older-releases/1.5.15/libpng-1.5.15.tar.gz

"01-libpng-download":
  command: curl -o /tmp/libpng-1.5.15.tar.gz https://excellmedia.dl.sourceforge.net/project/libpng/libpng15/older-releases/1.5.15/libpng-1.5.15.tar.gz

@MoacirPetry
Copy link

I received this issue:

[ec2-user@ip-172-31-43-87 ~]$ tar xzvf /tmp/libpng-1.5.15.tar.gz -C /tmp

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
[ec2-user@ip-172-31-43-87 ~]$ 

And checking this file, I discovered this:

[ec2-user@ip-172-31-43-87 tmp]$ file libpng-1.5.15.tar.gz 
libpng-1.5.15.tar.gz: HTML document, ASCII text
[ec2-user@ip-172-31-43-87 tmp]$ 

So my solution was use wget because it's download as the 'gzip compressed data'. And afterward I just used the tar without the z option.

Solution:

packages:
  yum:
    zlib: []
    fontconfig: []
    freetype: []
    libX11: []
    libXext: []
    libXrender: []
    xorg-x11-fonts-75dpi: []
    xorg-x11-fonts-Type1: []

commands:
  "01-libpng-download":
    command: cd /tmp && wget https://excellmedia.dl.sourceforge.net/project/libpng/libpng15/older-releases/1.5.15/libpng-1.5.15.tar.gz
  "02-libpng-extract":
    command: mkdir /tmp/libpng-1.5.15 && tar xvf /tmp/libpng-1.5.15.tar.gz -C /tmp
  "03-libpng-compilation":
    command: cd /tmp/libpng-1.5.15 && ./configure && sudo make install
  "04-libpng-clean":
    command: sudo rm -rf /tmp/libpng-1.5.15*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment