Ad Widget

Collapse

Problem compiling v2.2.1 --with-libxml2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Saichovsky
    Junior Member
    • Nov 2013
    • 5

    #1

    Problem compiling v2.2.1 --with-libxml2

    Hi all,

    I am trying to compile zabbix binaries (version 2.2.1) for myself with VMware monitoring support and I have installed libxml2, but ./configure always ends with these lines:

    Code:
    checking for xml2-config... /usr/bin/xml2-config
    checking for xmlReadMemory in -lxml2... no
    configure: error: Not found libxml2 library
    What am I to do in order to get past this hurdle? Thanks.

    S.
  • tchjts1
    Senior Member
    • May 2008
    • 1605

    #2
    Try also installing libxml2-devel then do a compile.
    Hope that fixes it for you.

    Comment


    • cesarsj
      cesarsj commented
      Editing a comment
      That didn't work for me on Ubuntu 20.04 LTS.
  • Saichovsky
    Junior Member
    • Nov 2013
    • 5

    #3
    Hey tchjts1,

    I'm compiling on Debian Squeeze. The package on Debian is libxml2-dev, which I already have installed but the error keeps showing up. See below (All lines starting with 'i' have packages which are already installed)

    Code:
    debian@debian:~/zabbix-2.2.1$ aptitude search libxml2
    i A libglobus-libxml2               - Globus Toolkit - LibXML2 Library          
    i   libglobus-libxml2-dev           - Globus Toolkit - LibXML2 Library Developme
    i   libxml2                         - GNOME XML library                         
    i   libxml2-dbg                     - Debugging symbols for the GNOME XML librar
    i   libxml2-dev                     - Development files for the GNOME XML librar
    p   libxml2-doc                     - Documentation for the GNOME XML library   
    i A libxml2-utils                   - XML utilities                             
    i A python-libxml2                  - Python bindings for the GNOME XML library 
    p   python-libxml2-dbg              - Python bindings for the GNOME XML library 
    v   python2.5-libxml2               -                                           
    v   python2.5-libxml2-dbg           -                                           
    v   python2.6-libxml2               -                                           
    v   python2.6-libxml2-dbg           -                                           
    debian@debian:~/zabbix-2.2.1$

    Comment

    • Ropetin
      Junior Member
      • Oct 2013
      • 2

      #4
      Can you list your full ./configure? Are you trying to enable static binaries by any chance?

      Comment

      • Saichovsky
        Junior Member
        • Nov 2013
        • 5

        #5
        Hey Ropetin,

        I was attempting to compile using the --enable-static switch. I have disabled it and so far I have been successful. I only ran into another hitch where ./configure complained that javac was not in the executable path, so I have had to compile without the --enable-java option, even though the $JAVA_HOME/bin was in the $PATH

        Comment

        • tchjts1
          Senior Member
          • May 2008
          • 1605

          #6
          Originally posted by Saichovsky
          ./configure complained that javac was not in the executable path, so I have had to compile without the --enable-java option, even though the $JAVA_HOME/bin was in the $PATH
          Whenever I compile with java enabled, I export the paths like this prior to compiling:

          export JAVA_HOME=/opt/jdk1.7.0_07
          export PATH=$JAVA_HOME/bin:$PATH

          Comment

          • anishkvmca
            Junior Member
            • Apr 2016
            • 13

            #7
            In CentOs "yum install libxml2-devel"

            It resolved my error

            Comment

            Working...