-
-
Save biserz/f52c8dc42124569331d9214f885c9f8c to your computer and use it in GitHub Desktop.
commands: | |
# Install GNU Java Compiler | |
01_install_libgcj: | |
command: yum -y install libgcj | |
ignoreErrors: true | |
# Install PDFtk | |
02_wget_pdftk: | |
command: wget https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-2.02-1.x86_64.rpm | |
ignoreErrors: true | |
03_install_pdftk: | |
command: rpm -ivh pdftk-2.02-1.x86_64.rpm | |
ignoreErrors: true | |
# Install PDFJam | |
04_install_tetex_latex: | |
command: yum -y install tetex-latex | |
ignoreErrors: true | |
05_wget_pdfjam: | |
command: sudo wget http://dl.fedoraproject.org/pub/epel/6/i386/Packages/p/pdfjam-2.08-1.el6.noarch.rpm | |
ignoreErrors: true | |
06_install_pdfjam: | |
command: rpm -ivh pdfjam-2.08-1.el6.noarch.rpm | |
ignoreErrors: true |
Hello. I am getting the same error as @ankitsam. I haven't found a resolution. I was wondering if you have.
This seems to have worked for me:
commands:
# Install GNU Java Compiler
01_install_libgcj:
command: yum -y --setopt=obsoletes=0 install libgcj
ignoreErrors: true
# Install PDFtk
02_wget_pdftk:
command: wget https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-2.02-1.x86_64.rpm
ignoreErrors: true
test: test ! -f .pdftk
03_install_pdftk:
command: rpm -ivh pdftk-2.02-1.x86_64.rpm
test: test ! -f .pdftk
# Install PDFJam
04_install_tetex_latex:
command: yum -y install tetex-latex
ignoreErrors: true
05_wget_pdfjam:
command: sudo wget http://dl.fedoraproject.org/pub/epel/6/i386/Packages/p/pdfjam-2.08-1.el6.noarch.rpm
test: test ! -f .pdftk
06_install_pdfjam:
command: rpm -ivh pdfjam-2.08-1.el6.noarch.rpm
test: test ! -f .pdftk
07_install_pdftk:
command: touch .pdftk
I needed to modified the version from @vicpada, not sure if it is dangerous (see remove libgcc72). I also removed the PDFJam thing that I think I don't need:
commands:
00_remove_libgcc72:
command: yum -y remove libgcc72
ignoreErrors: true
test: test ! -f .pdftk
# Install GNU Java Compiler
01_install_libgcj:
command: yum -y --setopt=obsoletes=0 install libgcj
ignoreErrors: true
test: test ! -f .pdftk
# Install PDFtk
02_wget_pdftk:
command: wget https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-2.02-1.x86_64.rpm
ignoreErrors: true
test: test ! -f .pdftk
03_install_pdftk:
command: rpm -ivh pdftk-2.02-1.x86_64.rpm
ignoreErrors: true
test: test ! -f .pdftk
04_flag_install_pdftk:
command: touch .pdftk
I followed this article https://www.linuxglobal.com/pdftk-works-on-centos-7/ and built pdftk package including the missing libs. So now there's no need to install libgcj
Repace with this:
# Install PDFtk
01_wget_pdftk:
command: sudo wget https://hone-compiled-packages.s3.eu-central-1.amazonaws.com/pdftk-pdfw-2.02-1.x86_64.rpm
ignoreErrors: true
02_install_pdftk:
command: rpm -ivh pdftk-pdfw-2.02-1.x86_64.rpm
ignoreErrors: true
# Install PDFJam
04_install_tetex_latex:
command: yum -y install tetex-latex
ignoreErrors: true
05_wget_pdfjam:
command: sudo wget https://hone-compiled-packages.s3.eu-central-1.amazonaws.com/pdfjam-2.08-1.el6.noarch.rpm
ignoreErrors: true
06_install_pdfjam:
command: rpm -ivh pdfjam-2.08-1.el6.noarch.rpm
ignoreErrors: true
Tested on AWS Linux with Ruby 2.6.6 and AWS Linux 2 with Ruby 2.6.6
Also the 01_el5_yum.config is obsolete now and can be removed
This last config posted by @dimitrovmaksim works perfectly for me on Amazon Linux 2
Well, this is not working for ARM instances :(
[ec2-user@ip-172-31-16-4 ~]$ sudo rpm -ivh pdftk-pdfw-2.02-1.x86_64.rpm
Verifying... ################################# [100%]
Preparing... ################################# [100%]
package pdftk-pdfw-2.02-1.x86_64 is intended for a different architecture
[ec2-user@ip-172-31-16-4 ~]$
Not working.