0

I'm trying to install a command line pdf manipulation program called "pdftk" on CentOS 7. I've tried several ways to get it installed and running into issues.

If I try to install the rpm I get this error:

sudo rpm -i pdftk-2.02-1.el6.i686.rpm
error: Failed dependencies:
    libgcj.so.10 is needed by pdftk-2.02-1.el6.i686

However, I have installed these libs:

Package libgcj-4.8.2-16.el7.i686 already installed and latest version
Package libgcj-devel-4.8.2-16.el7.i686 already installed and latest version

I have even tried to compile from the source and I run into:

make -f Makefile.Redhat

with these errors:

/bin/sh: gcjh: command not found

Any ideas?

S.ov
  • 331
  • 2
  • 4
  • 12
  • The version of the tool you try to install is for EL6 (e.g. CentOS 6, see the `el6` part in the file name). Get a version for EL7. – Sven Apr 23 '16 at 17:41
  • Don't use pdftk; it's under a non-free license, and gcj is a dead project, which are the two major reasons why pdftk isn't included in CentOS anymore. If you have something that requires pdftk, yell at its author until they fix it to use some other library. – Michael Hampton Apr 23 '16 at 17:43
  • Thanks for the info. Is there another library that can replace pdftk? I'm mainly interested in using the pdf merge functionality. – S.ov Apr 23 '16 at 18:04
  • I'm curious if I can hack this executable from FreeBSD to run temporarily while I find a solution? when I run it on CentOS (the binary from FreeBSD) it runs but says: "./pdftk: /libexec/ld-elf.so.1: bad ELF interpreter: No such file or directory" - could I copy that file over and it might run? – S.ov Apr 23 '16 at 18:28

2 Answers2

0

As of 2021, there is pdftk-java: A port of the original GCJ-based PDFtk to Java, which is currently on the way to the repositories for Fedora 33+ and EPEL 7+ (latter for CentOS, RHEL or Rocky), allowing yum install pdftk-java to succeed (once the pdftk-java package reached the stable repositories).

rsc
  • 357
  • 1
  • 6
-2

Please try this:

yum localinstall https://www.globallinuxsecurity.pro/static/blog/pdftk-2.02-1.el7.x86_64.rpm
techraf
  • 4,163
  • 8
  • 27
  • 44
Mukesh
  • 1
  • 2
    Can anyone speak to the authenticity of this? I don't feel comfortable installing server software from some sketchy 3rd party. – Raymond Jan 26 '17 at 16:01
  • Answers telling users to run commands with untrusted urls are a bad idea. If you have a solution that you have packaged up, it would be better to explain the solution and show the user how they can do it themselves. – Shovas Jan 26 '19 at 21:22