I'm a newbie trying to install PHP 5 on a minimal Debian box. I used apt to install libxml2, but when I try to configure PHP, it returns the following error...

checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
configure: error: xml2-config not found. Please check your libxml2 installation.

When I run locate libxml2, I can see the following...
/var/cache/apt/archives/libxml2-dev_2.4.19-4woody1_i386.deb
/var/cache/apt/archives/libxml2_2.4.19-4woody1_i386.deb
/var/lib/dpkg/info/libxml2.list
/var/lib/dpkg/info/libxml2.postrm

    Easy one...

    I had this problem.

    You can download a libxml2 from gnome.org

    Just extract it on your server.

    ./configure

    make

    make install

    Then run your php ./configure --etc... again and it should work.

      Nice - it took me a little bit to find it, but here is the link for others...

      http://ftp.gnome.org/pub/GNOME/MIRRORS.html


      Now, I'm get an error that says it is unable to find zlib. It suggests that I add --with-zlib-dir=<DIR>, but I'm not sure if I already have zlib, or where I can get it.

      I used apt to update my kernel to 2.4.18 and it included zlib1g. When I try to locate zlib, I can see that apt folder and my php folder contains a /ext/zlib/ directory.

      When I do an apt-cache search zlib, it returns a few different ones (zlib-bin, zlib1, zlib1-altdev, zlib1g, zlib1g-dev, zlibc)

      Any ideas?

        3 months later

        just for future reference.

        once in the mirrors go to this:

        GNOME/sources/libxml2/2.6/
        or any future 2.x directory.

        but once that is installed.. it works like a charm.

          Write a Reply...