Activities

April 2015
M T W T F S S
« Mar   May »
 12345
6789101112
13141516171819
20212223242526
27282930  

How I install PDFtk Server in CentOS 6 /AWS server

PDFtk Server installation requires libgcj package installed. Unfortunately this package does not shipped with CentOS6 platform. So we need to install it from EL5 repository. Only after that we can install it.

You will get the error while installing the native PDFtk binary package as shown below,

[root@host01 installation]# rpm -ivh pdftk-2.02-1.el6.x86_64.rpm
error: Failed dependencies:
        libgcj is needed by pdftk-2.02-1.el6.x86_64
        libgcj.so.10()(64bit) is needed by pdftk-2.02-1.el6.x86_64
[root@host01 installation]

#

Solution

Installing libgcj

Create file /etc/yum.repos.d/public-yum-el5.repo with contents as below

[el5_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=1

[el5_ga_base]
name=Oracle Linux $releasever GA installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/0/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[el5_u1_base]
name=Enterprise Linux $releasever Update 1 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/1/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[el5_u2_base]
name=Enterprise Linux $releasever Update 2 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/2/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[el5_u3_base]
name=Enterprise Linux $releasever Update 3 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/3/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[el5_u4_base]
name=Enterprise Linux $releasever Update 4 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/4/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[el5_u5_base]
name=Enterprise Linux $releasever Update 5 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/5/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[ol5_u5_base]
name=Oracle Linux $releasever Update 5 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/5/base/x86_64/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[ol5_u6_base]
name=Oracle Linux $releasever Update 6 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/6/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[ol5_u7_base]
name=Oracle Linux $releasever Update 7 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/7/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[ol5_u8_base]
name=Oracle Linux $releasever Update 8 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/8/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[el5_addons]
name=Enterprise Linux $releasever Add ons ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/addons/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[el5_oracle_addons]
name=Oracle Software addons for Enterprise Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/oracle_addons/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[ol5_UEK_latest]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/UEK/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[ol5_UEK_base]
name=Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/UEK/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[el5_unsupported]
name=Productivity Applications for Enterprise Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/unsupported/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

Then install libgcj

[root@PH-YB01 installation]# yum install libgcj
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/latest
amzn-updates/latest
4752 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
Dependencies Resolved

=============================================================================================
 Package                             Arch                    Version
=============================================================================================
Installing:
 libgcj                              x86_64                  4.1.2-55.el5
Installing for dependencies:
 atk                                 x86_64                  1.12.2-1.fc6
 compat-libtiff3                     x86_64                  3.9.4-10.13.amzn1
 gtk2                                x86_64                  2.10.4-30.el5
 hicolor-icon-theme                  noarch                  0.9-2.1
 libXcursor                          x86_64                  1.1.14-2.1.9.amzn1
 libXft                              x86_64                  2.3.1-2.7.amzn1
 libXinerama                         x86_64                  1.1.2-2.7.amzn1
 libXrandr                           x86_64                  1.4.1-2.1.8.amzn1
 libart_lgpl                         x86_64                  2.3.20-5.1.7.amzn1
 libthai                             x86_64                  0.1.12-3.5.amzn1
 pango                               x86_64                  1.28.1-10.11.amzn1

Transaction Summary
=============================================================================================
Install  1 Package (+11 Dependent packages)

Total download size: 26 M
Installed size: 75 M
Is this ok [y/d/N]: y

2. Installing PDFtk server package

YOu can choose the package from https://www.pdflabs.com/docs/install-pdftk-on-redhat-or-centos/

It’s been found that Cento6 64 bit package showing same issue while installing it. So I uses CentOS5 64 bit version.

[root@PH-YB01 installation]# wget https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-2.02-1.x86_64.rpm
[root@PH-YB01 installation]# rpm -ivh pdftk-2.02-1.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:pdftk-2.02-1                     ################################# [100%]
[root@PH-YB01 installation]#
root@PH-YB01 installation]#  pdftk --version
pdftk 2.02 a Handy Tool for Manipulating PDF Documents
Copyright (c) 2003-13 Steward and Lee, LLC - Please Visit: www.pdftk.com
This is free software; see the source code for copying conditions. There is
NO warranty, not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@PH-YB01 installation]#

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>