Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

1 Answer 1

up vote 1 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
After installing that package, are there any extra options I would need to use in g++/eclipse? – Matthew Mellott Dec 2 '12 at 4:10

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.