PHP编译过程常见错误&解决方法

环境

  • Ubuntu 12.04 x86_64
  • php5.6.9

错误提示&解决方法

xml2-config not found. Please check your libxml2 installation.

1
sudo apt-get install libxml2-dev

Cannot find OpenSSL’s

1
sudo apt-get install libcurl4-openssl-dev

Please reinstall the BZip2 distribution

1
sudo apt-get install libbz2-dev

Cannot find enchant

1
sudo apt-get install libenchant-dev

png.h not found.

1
sudo apt-get install libpng12-dev

Unable to locate gmp.h

1
sudo apt-get install libgmp-dev

utf8_mime2text() has new signature, but U8T_CANONICAL is missing

1
sudo apt-get install libc-client2007e-dev

libgds, libib_util or libfbclient not found!

1
sudo apt-get install firebird2.5-dev

Unable to detect ICU prefix or no failed

1
sudo apt-get install libicu-dev

cannot find ldap libraries in /usr/lib

1
2
sudo apt-get install libldap2-dev
sudo ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/

mcrypt.h not found. Please reinstall libmcrypt.

1
sudo apt-get install libmcrypt-dev

Cannot find FreeTDS in known installation directories

1
sudo apt-get install freetds-dev

Could not find /usr/lib/libsybdb.a|so

1
sudo ln -fs /usr/lib/x86_64-linux-gnu/libsybdb.so /usr/lib/

Oracle Instant Client directory /usr/lib/oracle/…/client64/lib libraries not found

cannot stat ‘/usr/local/lib/odbclib.a’: No such file or directory

1
2
sudo apt-get install unixodbc-dev
sudo ln -fs /usr/lib/x86_64-linux-gnu/libodbc.a /usr/local/lib/odbclib.a

ODBC header file ‘/usr/local/incl/sqlext.h’ not found!

1
2
3
sudo apt-get install unixodbc-dev
sudo mkdir /usr/local/incl
sudo cp /usr/include/sqlext.h /usr/local/incl/

Cannot find pspell

1
sudo apt-get install libpspell-dev

Please reinstall libedit - I cannot find readline

1
sudo apt-get install libedit-dev

Can not find recode.h anywhere under yes /usr/local /usr /opt

1
sudo apt-get install librecode-dev

Cannot find libtidy

1
sudo apt-get install libtidy-dev

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

1
sudo apt-get install libxslt1-dev

ctpublic.h missing!

1
2
sudo apt-get install freetds-dev
--with-sybase-ct=shared,/usr
坚持原创技术分享,您的支持将鼓励我继续创作!