Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having trouble installing pdftk on an amzn-ami-2011.09.2.x86_64-ebs (ami-953b06e1) instance.

Since pdftk is not in the list of available packages I have tried to build it from source but failed due to a missing dependency – cgj, Java GNU Compiler, which also isn't available in the packages list.

I have already installed gcc, gcc-c++ and make besides the default packages.

share|improve this question

Running PDFtk on Amazon Linux is possible. I wrote a blog post about running PDFtk on AWS Lambda, which runs on Amazon Linux:

It should be entirely possible to use the binary I compiled, along with to run PDFtk on an Amazon Linux EC2. The binary and shared library in this repository should work for you:


The basics steps to get PDFtk running on Amazon Linux are to compile it from source on CentOS 6, then copy the pdftk binary and (usually located in /usr/lib64/ to your Amazon Linux machine.

Place the binary in a directory in your PATH, and in a directory in your LD_LIBRARY_PATH so the system knows where to find them.

Alternatively you can run the binary directly:

LD_LIBRARY_PATH=/path/to/ /path/to/pdftk --version

You can skip the compile step by using the binary and shared library in the bin/ directory of the Github project I linked to above.

share|improve this answer
It would be better if you included the basic steps in the answer. – Ayan Jun 30 '15 at 3:20
@Ayan good suggestion. Updated. – marcus Jul 1 '15 at 18:16

You may be out of luck:

GCJ is not supported on the Amazon Linux AMI, which is why you are running into this problem.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .