So I wanted to munge an image file to make it clear a site was an internal test site and not the main customer facing site. Imager looked to be just the ticket, and indeed it is very nice to use except that on Windows (where I was testing the script) I could only work with a .bmp version of the image - not the .png image I really wanted to work with. Never mind I thought, on the Linux machine where the script will finally run I'll be able to install Imager::File::PNG and all will be well.

Well, it's not! I get the same failure I did when I used cpan to try to install Imager::File::PNG on Windows. The Linux box is running 64 bit Debian Squeeze. Imager installed fine using apt-get on Debian and ppm on Windows. The relevant (I hope) part of the cpan output is:

Appending installation info to /usr/local/lib/perl/5.10.1/perllocal.po +d TONYC/Imager-0.93.tar.gz /usr/bin/make install -- OK Running make for T/TO/TONYC/Imager-File-PNG-0.86.tar.gz CPAN.pm: Going to build T/TO/TONYC/Imager-File-PNG-0.86.tar.gz PNG: building independently PNG: Not found via pkg-config PNG: Generic: includes not found - libraries not found PNG: v1.5: includes not found - libraries not found PNG: v1.4: includes not found - libraries not found PNG: v1.2: includes not found - libraries not found PNG: v1.0: includes not found - libraries not found PNG: base (+libz): includes not found - libraries not found PNG: v1.5 (+libz): includes not found - libraries not found PNG: v1.4 (+libz): includes not found - libraries not found PNG: v1.2 (+libz): includes not found - libraries not found PNG: v1.0 (+libz): includes not found - libraries not found PNG: Checking if the compiler can find them on its own Note (probably harmless): No library found for -lpng PNG: Test code failed: Can't link/include 'png.h', 'stdio.h', 'png' OS unsupported: PNG libraries or headers not found

Looks like there is a missing PNG library, but I can't tell what it is. Can anyone offer some help?

True laziness is hard work

In reply to Failure trying to build Imager::File::PNG by GrandFather

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.