Ubuntu 安装php

1. 安装php之前 应该先安装php的支持库,能避免后面出现的数个错误.
主要有
代码:
apt-get install libxml2 libldap-2.4-2 libmhash2 libmysqlclient16 curl libpng3 libjpeg62 libsasl2-2 libmcrypt4 libltdl7 autoconf

2.安装openssl
代码:
sudo apt-get install libssl0.9.8
sudo apt-get install libssl-dev
sudo apt-get install openssl

3.configure: error: Please reinstall the libcurl distribution -
easy.h should be in /include/curl/
代码:
apt-get install curl
apt-get install libcurl3
apt-get install libcurl4-gnutls-dev

4.
Configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!
代码:
apt-get install libmysql++-dev


5.configure: error: freetype.h not found.
代码:
apt-get install libfreetype6-dev


6.checking for termcap functions library… configure: error: No curses/termcap library found
代码:
apt-get install libncurses5-dev


7.安装libpng/libjpeg
代码:
apt-get install libpng12-dev
apt-get install libjpeg62-dev



8.安装autoconf 不安装的话,memcache等扩展无法编译
代码:
apt-get install autoconf

你可能感兴趣的:(PHP,Ubuntu)