Server Fault is a question and answer site for system and network administrators. 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 want to compile wkhtmltopdf on Ubuntu Server, but I have a problem with following errors:

/usr/lib/libQtGui.so: undefined reference to `png_read_info@PNG12_0'
/usr/lib/libQtGui.so: undefined reference to `png_set_gAMA@PNG12_0'
/usr/lib/libQtGui.so: undefined reference to `png_set_PLTE@PNG12_0'
...
/usr/lib/libQtGui.so: undefined reference to `png_create_info_struct@PNG12_0'
/usr/lib/libQtGui.so: undefined reference to `png_set_bgr@PNG12_0'
/usr/lib/libQtGui.so: undefined reference to `png_get_valid@PNG12_0'

What can I do?

in /usr/lib

lrwxrwxrwx  1        17 2010-02-17 15:00 libQtGui.so -> libQtGui.so.4.5.2
lrwxrwxrwx  1        17 2010-02-17 14:59 libQtGui.so.4 -> libQtGui.so.4.5.2
lrwxrwxrwx  1        17 2010-02-17 14:59 libQtGui.so.4.5 -> libQtGui.so.4.5.2
-rw-r--r--  1  10071604 2009-10-14 23:34 libQtGui.so.4.5.2
share|improve this question

Sounds to me like you need libpng or libpng2 installed.

sudo yum search libpng

and/or

sudo yum install libpng

share|improve this answer

yum doesn't exist in Ubuntu. yum is in fedora or other RedHat based distributions. In Ubuntu you use apt so you could try :

sudo apt-get install libpng
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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