Forum Bugs

Install PrinceXML on Centos 5.10. Error no version information available

Golovior
Hello,

I've installed PrinceXML (prince-9.0-2.centos55.x86_64.rpm) on a Centos 5.10 server.
But I can't get it to work.

If I try to create a PDF, i get the following message:

/usr/lib/prince/bin/prince: /usr/local/lib/libpng12.so.0: no version information available (required by /usr/lib/prince/bin/prince)
prince: warning: failed to load external entity "google.com"
prince: google.com: error: could not load input file
prince: error: no input documents to process

(i've tried google.com because i know it exists)
I hope someone can help me with this.
Thank you in advance.
mikeday
Did you run "prince http://www.google.com -o out.pdf" ? If you just use "google.com" Prince will look for a local file with that name.

Also, the libpng warning is unexpected; what do you get if you run "rpm -qa | grep libpng" ?
Golovior
When running "prince http://www.google.com -o out.pdf"

I get:
/usr/lib/prince/bin/prince: /usr/local/lib/libpng12.so.0: no version information available (required by /usr/lib/prince/bin/prince)
prince: warning: no glyphs for character U+005A, fallback to '?'
prince: internal error: no available fonts

When running "rpm -qa | grep libpng"

i get:
libpng-1.2.10-17.el5_8
libpng-devel-1.2.10-17.el5_8
libpng-1.2.10-17.el5_8

The "no available fonts" error i think i can solve. I've seen this on my search for the other problem; the libpng error.
mikeday
Right, installing some fonts should fix that. It looks like you have two copies of libpng installed for some reason, perhaps one in /usr/lib and one in /usr/local/lib?
Golovior
The png files in /usr/local/lib:
libpng.a
libpng.so
libpng.so.3
libpng.so.3.1.2.33
libpng12.a
libpng12.so
libpng12.so.0
libpng12.so.0.1.2.33

The png files in usr/lib:
libpng.so.3
libpng.so.3.10.0
libpng12.so.0
libpng12.so.0.10.0

If it is installed on both places, there are a lot of differences in the files.

After some search on the internet i found that it might be because i also have DirectAdmin running on the server.

Is there a way to solve this, without destroying the server at the same time?
mikeday
Since we don't know exactly why the second libpng installation is there, it would probably be wise not to uninstall it at this point. I'm wondering why the copy in /usr/local is being examined in the first place, perhaps LD_LIBRARY_PATH has been set. Do you get any output if you run "echo $LD_LIBRARY_PATH" ?
Golovior
No, just an empty row.
mikeday
Okay last check, what if you run "ldd /usr/lib/prince/bin/prince | grep libpng" ?
Golovior
Response:

/usr/lib/prince/bin/prince: /usr/local/lib/libpng12.so.0: no version information available (required by /usr/lib/prince/bin/prince)
libpng12.so.0 => /usr/local/lib/libpng12.so.0 (0x00007ff70d565000)
mikeday
Thanks, strange that it isn't picking up the library in /usr/lib, which is more likely to be correct. However, is the warning actually causing any problems? Can you successfully convert a HTML document that references PNG images to PDF?
Golovior
Not at this moment.
I haven't installed the fonts yet, and with no knowledge of Centos at all (except for the last 2 days), it is pretty hard to do.
mikeday
You can install the DejaVu fonts with this command:
sudo yum install dejavu-lgc-fonts

Installing the Microsoft Core Fonts package is a little trickier.
Golovior
I installed dejavu-lgc-fonts now, but how can princexml uses the Microsoft Core Fonts package, Is there a way i can change that to the DejaVu fonts?
Golovior
I've found this topic:
http://www.princexml.com/forum/topic/449/installing-license-installing-fonts

And it helped me with setting the dejavu url as font source.

Now i've created the out.pdf, mentioned in mikeday's first post.
It works perfectly now.

Thank you again.