老牛  2014-01-07 17:18  阅读 183 views 次 评论 1 条

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

This error message suggests you don't have libxml2 installed. What it really means though is that you don't have its development version installed!

Let's then search what we can find in available packages, what could help us resolve this issue:

$ apt-cache search libxml2 | grep dev
libcroco3-dev - Cascading Style Sheet (CSS) parsing and manipulation toolkit
libxml++2.6-dev - C++ interface to the GNOME XML library (libxml2)
libxml2-dev - Development files for the GNOME XML library
libgdome2-cpp-smart-dev - C++ bindings for GDome2 DOM implementation
libgdome2-dev - Development files for libgdome2
libgdome2-ocaml-dev - OCaml bindings for GDome2 DOM implementation
libgtkmathview-dev - rendering engine for MathML documents
libsp-gxmlcpp-dev - S+P C++ wrapper for Gnome libxml2/libxslt
What we are interested in here is libxml2-dev, let's install it then:

sudo apt-get install libxml2-dev

The same procedure applies to all other missing libraries as well, so I will include only final install calls from now on.

configure: error: Could not find pcre.h in /usr

sudo apt-get install libpcre3-dev

configure: error: Please reinstall the BZip2 distribution

sudo apt-get install libbz2-dev

configure: error: Please reinstall the libcurl distribution - easy.h should be in /include/curl/

sudo apt-get install libcurl4-openssl-dev

configure: error: DBA: Could not find necessary header file(s).
checking for db4 major version... configure: error: Header contains different version

sudo apt-get install libdb4.8-dev

configure: error: libjpeg.(a|so) not found.

sudo apt-get install libjpeg-dev

configure: error: libpng.(a|so) not found.

sudo apt-get install libpng12-dev

configure: error: libXpm.(a|so) not found.

sudo apt-get install libxpm-dev

configure: error: freetype.h not found.

sudo apt-get install libfreetype6-dev

You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.

configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path

sudo apt-get install postgresql-server-dev-9.1

Make sure you check result of apt-cache search especially in case of this error, as there could be later version of PostgreSQL available.
checking for FreeType 1 support... no - FreeType 2.x is to be used instead

configure: error: Your t1lib distribution is not installed correctly. Please reinstall it.

sudo apt-get install libt1-dev

configure: error: Unable to find gd.h anywhere under /usr

sudo apt-get install libgd2-xpm-dev

configure: error: Unable to locate gmp.h

sudo apt-get install libgmp-dev

configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!

sudo apt-get install libmysqlclient-dev

configure: error: sasl.h not found!

sudo apt-get install libsasl2-dev

configure: error: Please reinstall libmhash - I cannot find mhash.h

sudo apt-get install libmhash-dev

checking for unixODBC support... configure: error: ODBC header file '/usr/include/sqlext.h' not found!

sudo apt-get install unixodbc-dev

configure: error: Directory /usr is not a FreeTDS installation directory

sudo apt-get install freetds-dev

configure: error: Cannot find pspell

sudo apt-get install libpspell-dev

configure: error: SNMP sanity check failed. Please check config.log for more information.

sudo apt-get install libsnmp-dev

configure: error: Cannot find libtidy

sudo apt-get install libtidy-dev

configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution

sudo apt-get install libxslt1-dev

configure: error: mcrypt.h not found. Please reinstall libmcrypt.

sudo apt-get install libmcrypt-dev

configure: error: Cannot find OpenSSL's libraries
Add following switch to your ./configure options (optionally updating the path to reflect your system):


configure: error: You've configured extension pdo_sqlite to build statically, but it depends on extension pdo, which you've configured to build shared. You either need to build pdo_sqlite shared or build pdo statically for the build to be successful.

Add following switches to your ./configure options:




版权声明:本文为原创文章,版权归 老牛 所有,欢迎分享本文,转载请保留出处!