I'm responsible for administration of a Centos 7 box at my contract job. I'm really more of a developer and not much of a Linux admin, so please bear with me and maybe try to explain this to me like I'm 5.

One of the apps we're working on needed something called pdftk. Unfortunately, a dependency for it is something called libgcj. I read that libgcj is considered deprecated and no longer "ships" with the new Centos 7.

So, I did this:

wget http://mirror.centos.org/centos/6/os/x86_64/Packages/libgcj-4.4.7-11.el6.x86_64.rpm
wget https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-2.02-1.el6.x86_64.rpm
rpm -ivh --nodeps libgcj-4.4.7-11.el6.x86_64.rpm
yum install pdftk-2.02-1.el6.x86_64.rpm

And yay pdftk works now. However, I've been reading around and have determined that this was a bad idea. No reasons given for why this was a stupid thing to do. So could anyone shed some light on why I shouldn't have done this? Or perhaps give me some advice or precautions I should take now? I'm afraid to restart the server or install updates until I know this won't break our box.

Thank you in advance.

  • pdftk was dropped, in part for legal reasons (it uses iText which in its latest version has a bizarre and risky license) and in part because libgcj appears to have been abandoned. You should very strongly consider using a different PDF library for your program, if possible. There are many others out there... Jun 13, 2015 at 2:58
  • Yes, we've considered it, but that is not an option at this point. It would require finding something that works similar enough and/or changing a lot of code. Too much effort in too little time. Jun 13, 2015 at 3:03
  • I suppose this will work for now, but you'll end up having to change out the library anyway. You won't (legally) get any security or other updates for pdftk. Your general question requires a more indepth explanation, though... Jun 13, 2015 at 3:13

2 Answers 2


This is not meant to be a complete answer, but since until now nobody has provided reasons on why this isn't procedure CAN be a bad idea:

Certain versions of packages rely on functions provided by external libraries. Those libraries change over time, and in that process possibly change their behavior or even completely remove functions. Moving from EL6 to EL7 is quite a big step, so there might be an new version of package/library XYZ, which might generally work with your installed version of the package, but not in full extent.

In your case pdftk might generally work as expected, but in some special cases there might be a function call, which won't work with the rest of the installed packages, and thus might crash or behave unexpectedly. Evaluating where this misbehavior has it's source would become very tricky then.

There might be a whole lot of other reasons not to do this, but this is the first thing I think of, and for production systems stability is key. Hence, I wouldn't mixup versions not design for a specific OS release. At least not without thorough testing.

  • Thank you for your insights, this gives me some understanding. Jun 14, 2015 at 2:36

The main problem is:

It is not supported

You can use some command lines to bring gcc-java, libgcj, libgcj-devel onto your system. However, this software is not supported on CentOS 7. Things are more likely to break when you are using such configurations that are not supported. Which leads us to...

Rackspace won't support it. A benefit of using CentOS over Ubuntu is, of course, it has better enterprise support. You lose all of that when you use unsupported configurations like this. So if you tell Rackspace "go make me a server with XYZ software, including pdftk" they will tell you "no".

If anyone else NEEDS pdftk to work on CentOS 7 in a supported configuration, a fork exists to rewrite the Java parts and get it accepted into CentOS 7. My company NEEDS this and I don't have time to do it so we are starting a bounty for this work. I invite you to check out this bounty and fork at https://github.com/fulldecent/pdftk

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.