ubuntu12.04安装LiteSpeed后编译php提示错误的解决方法汇总

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:

1
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

1
sudo apt-get install libpcre3-dev

configure: error: Please reinstall the BZip2 distribution

1
sudo apt-get install libbz2-dev

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

1
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

1
sudo apt-get install libdb4.8-dev

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

1
sudo apt-get install libjpeg-dev

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

1
sudo apt-get install libpng12-dev

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

1
sudo apt-get install libxpm-dev

configure: error: freetype.h not found.

1
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

1
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.

1
sudo apt-get install libt1-dev

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

1
sudo apt-get install libgd2-xpm-dev

configure: error: Unable to locate gmp.h

1
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!

1
sudo apt-get install libmysqlclient-dev

configure: error: sasl.h not found!

1
sudo apt-get install libsasl2-dev

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

1
sudo apt-get install libmhash-dev

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

1
sudo apt-get install unixodbc-dev

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

1
sudo apt-get install freetds-dev

configure: error: Cannot find pspell

1
sudo apt-get install libpspell-dev

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

1
sudo apt-get install libsnmp-dev

configure: error: Cannot find libtidy

1
sudo apt-get install libtidy-dev

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

1
sudo apt-get install libxslt1-dev

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

1
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):

1
--with-libdir=/lib/x86_64-linux-gnu

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:

1
2
  --with-pdo-sqlite=shared
  --with-sqlite=shared

原文地址

原文链接:https://xiaohost.com/518.html,转载请注明出处。
0

评论1

请先