Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 am trying to build a library (libaiml). I was having problems installing the library using normal methods:

./configure ; make ; make install

In the README, the author says you should use this method to install the libarary, but the standard download does not come with a configure file.

To get around this, I decided to import the source into eclipse and try building the library myself. Now I am having a problem resolving the libxml2 dependency.

I am fairly sure I have the libxml2 package installed:

matt@ubuntu:~/Desktop$ apt-cache policy libxml2
  Installed: 2.7.8.dfsg-5.1ubuntu4.2
  Candidate: 2.7.8.dfsg-5.1ubuntu4.2
  Version table:
 *** 2.7.8.dfsg-5.1ubuntu4.2 0
        500 precise-updates/main i386 Packages
        500 precise-security/main i386 Packages
        100 /var/lib/dpkg/status
     2.7.8.dfsg-5.1ubuntu4 0
        500 precise/main i386 Packages

But eclipse is saying it cannot resolve resolve this inclusion (in aiml_parser.cpp):

#include <libxml2/parserInternals.h>

In another post, I saw that you could check if a library was installed by running the following command:

matt@ubuntu:~/Desktop$ gcc -lxml2
/usr/bin/ld: cannot find -lxml2
collect2: ld returned 1 exit status

If this output is telling me the library cannot be found, how is this possible when the package is installed?

share|improve this question
up vote 2 down vote accepted

You need to install the accompanying -dev package to be able to compile against a library. For libxml2 this would be libxml2-dev.

share|improve this answer

Your Answer


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.