Hi all,

I encountered problems installing and using PDF::API2. My hosting server has the following OS and architecture:
Operating System: CentOS Linux 7 (Core) CPE OS Name: cpe:/o:centos:centos:7 Kernel: Linux 3.10.0-514.16.1.el7.x86_64 Architecture: x86-64
The steps I had taken to install PDF::API2 were (after logging in as a user using PUTTY):
[user@web100 ~]$ cd $HOME/bin [user@web100 ~ bin]$ cpanm PDF::API2 --> Working on PDF::API2 Fetching http://www.cpan.org/authors/id/S/SS/SSIMMS/PDF-API2-2.031.tar +.gz ... OK Configuring PDF-API2-2.031 ... OK Building and testing PDF-API2-2.031 ... FAIL ! Installing PDF::API2 failed. Retry with --force to force install it. [user@web100 ~]$ cpanm PDF::API2 --force --> Working on PDF::API2 Fetching http://www.cpan.org/authors/id/S/SS/SSIMMS/PDF-API2-2.031.tar +.gz ... OK Configuring PDF-API2-2.031 ... OK Building and testing PDF-API2-2.031 ... FAIL ! Testing PDF-API2-2.031 failed but installing it anyway. Successfully installed PDF-API2-2.031 1 distribution installed

When I tried to use PDF-API2, I got the following error:

Attempt to reload Compress/Zlib.pm aborted. Compilation failed in require at /home/../lib/perl5/PDF/API2/Content.p +m line 11. BEGIN failed--compilation aborted at /home/../lib/perl5/PDF/API2/Conte +nt.pm line 11. Compilation failed in require at /home/../lib/perl5/PDF/API2/Page.pm l +ine 12. BEGIN failed--compilation aborted at /home/../lib/perl5/PDF/API2/Page. +pm line 12. Compilation failed in require at /home/../lib/perl5/PDF/API2.pm line 1 +7. BEGIN failed--compilation aborted at /home/../lib/perl5/PDF/API2.pm li +ne 17.

Is it because PDF::API2 was not properly installed (because it was installed with --force)? Or there's something wrong with Zlib.pm?

Please enlighten me :)


In reply to Problem with installing and using PDF::API2 by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.