I got an error while compiling PHP, I am listing the details below.

Error configure error libxpm.(a so) not found

I have checked with dpkg -L libxpm-dev. it is showing the needed file is in the folder /usr/lib/x86_64-linux-gnu/(libXpm.a).

I have tried with --with-xpm-dir=/usr/lib/x86_64-linux-gnu, but error still exists.

2 Answers 2


I got past this by doing

sudo ln -s /usr/lib/x86_64-linux-gnu/libXpm.a /usr/lib/libXpm.a

You can also set the lib dir by adding


to the configure line but that missed some of the ones in /usr/lib.

  • Hello Jacek, Thank you, I have tried with both options, none of them works for me :(. Also I got another error("checking for db4 major version... configure: error: Header contains different version") while I am trying to include "--with-db4"
    – Dipu R
    Commented Mar 18, 2013 at 11:11

Hello I solved couple of problems via this link I hope it would help you.


  • 1
    Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Commented Apr 12, 2013 at 9:11

You must log in to answer this question.

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