I am fairly new to Linux (just getting set up using the Mint 16 distro), and I got everything working correctly with my Apache 2.4.9 with MySQL and PHP5.5, but I am using this for local Web development, and my host only has PHP5.3 installed. In order to make sure I don't use features that won't work in production, I want to install the older version instead of 5.5.

I downloaded the PHP-5.3.28 source tarball, but when I ran the configure script, it says:

configure: error: xml2-config not found. Please check your libxml2 installation.

Executing dpkg -l *xml* returns:

| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                            Version              Architecture         Description
un  docbk-xml                       <none>                                    (no description available)
ii  docbook-xml                     4.5-7.2              all                  standard XML documentation system for software and systems
un  liblouisxml-dev                 <none>                                    (no description available)
ii  libmono-system-xml-linq4.0-cil    all                  Mono System.Xml.Linq library (for CLI 4.0)
ii  libmono-system-xml4.0-cil    all                  Mono System.Xml library (for CLI 4.0)
ii  libqt4-xml:amd64                4:4.8.4+dfsg-0ubuntu amd64                Qt 4 XML module
ii  libqt4-xmlpatterns:amd64        4:4.8.4+dfsg-0ubuntu amd64                Qt 4 XML patterns module
ii  libqt5xml5:amd64                5.0.2+dfsg1-7ubuntu1 amd64                Qt 5 XML module
un  libxml-parser-lite-tree-perl    <none>                                    (no description available)
un  libxml-simple-perl              <none>                                    (no description available)
ii  libxml2:amd64                   2.9.1+dfsg1-3ubuntu2 amd64                GNOME XML library
un  libxml2-utils                   <none>                                    (no description available)
ii  python-libxml2                  2.9.1+dfsg1-3ubuntu2 amd64                Python bindings for the GNOME XML library
ii  python-lxml                     3.2.0-1              amd64                pythonic binding for the libxml2 and libxslt libraries
un  python-lxml-dbg                 <none>                                    (no description available)
un  python2.3-lxml                  <none>                                    (no description available)
un  python2.4-lxml                  <none>                                    (no description available)
un  python2.7-libxml2               <none>                                    (no description available)
un  python2.7-lxml                  <none>                                    (no description available)
ii  python3-lxml                    3.2.0-1              amd64                pythonic binding for the libxml2 and libxslt libraries
un  python3-lxml-dbg                <none>                                    (no description available)
un  python3.3-lxml                  <none>                                    (no description available)
ii  xml-core                        0.13+nmu2            all                  XML infrastructure and XML catalog file support

As you can see, libxml2:amd64 (I have a 64-bit system) is installed.

Could you direct me as to 1. what is wrong that it isn't recognizing it/finding the needed config file and 2. Whether proceeding with a make/make install of this standalone package will work without breaking the php functionality.

I had some trouble getting it set up this far (mainly because I'm in a steep learning curve for Linux right now), and I really don't want to have to go through that again, so I would rather leave it at 5.5 if it is too risky. :)

1 Answer 1


All you need to do is to install package libxml2-dev via:

sudo apt-get install libxml2-dev

See: How to fix error with xml2-config not found when installing PHP from sources?

In case of problems, update the list first by:

sudo apt-get update
  • Failed to fetch security.ubuntu.com/ubuntu/pool/main/libx/libxml2/… 404 Not Found
    – Kiee
    Sep 2, 2016 at 10:47
  • Just required, sudo apt-get update first.
    – Kiee
    Sep 2, 2016 at 10:52
  • Installing the dev package doesn't help. I have both libxml2 and libxml2-dev installed band the xml2-config is still missing.
    – Nicolas
    Sep 16, 2019 at 9:07

You must log in to answer this question.

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